Oracle Create Table

Oracle Create Table statement

How to use the CREATE TABLE statement to create tables.

Oracle Create Table syntax

CREATE TABLE table_name(
	column_name_1 datatype [DEFAULT expr][, ...], 
	column_name_2 datatype [DEFAULT expr][, ...],
	.....................
);

Create Table example

CREATE TABLE CUSTOMERS(
	ID    	NUMBER NOT NULL,
	NAME  	VARCHAR2(255) NOT NULL,
	ADDRESS	VARCHAR2(2000) NOT NULL,
	EMAIL	VARCHAR2(255), 
	ADD_DATE	DATE DEFAULT SYSDATE,
	CONSTRAINT PK_ID PRIMARY KEY(ID) 
);