Use the Create Table
command in Oracle to create a table.
To create a table in Oracle, you need to specify the column names and their data types.
In Oracle, there are several kinds of data types. The most important and most commonly used data types are:
- Varchar2
- Number
- Integer
- Date
- BLOB
- CLOB
For more details on Oracle database data types, check this link.
To create a table in Oracle, first, connect to your Oracle database schema/user using your credentials. For example:
sqlplus scott/[email protected]
Below is the basic syntax of Create Table
command:
Create Table table_name ( column_name1 data_type1 [Primary Key], column_name2 data_type2 [Not Null], column_name3 data_type3 ) /
Check Oracle Create Table
command in more detail.
Oracle Create Table Example
Create Table students ( st_id integer Primary Key, rollno integer Not Null, st_name varchar2(100), admission_date date, st_photo blob ) /
Check more Oracle Create table examples:
- How to Create a Table in Oracle SQL Developer?
- Oracle Create Table from Select Statement Example
- How to Generate Create Table Script in Toad Oracle?
- How to Create Schema in Oracle Using SQL Developer?