SQL: CREATE Table

The basic syntax for a CREATE TABLE is:

CREATE TABLE table_name
(column1 datatype null/not null,
column2 datatype null/not null,
...
);

Each column must have a datatype. The column should either be defined as "null" or "not null" and if this value is left blank, the database assumes "null" as the default.


For example:

CREATE TABLE supplier
( supplier_id numeric(10) not null,

supplier_name varchar2(50) not null,

contact_name varchar2(50)
)

Recent Tutorials