Add primary key as the last statement
SQL>
SQL>
SQL> CREATE TABLE myTable (
2 Name VARCHAR(50) NOT NULL,
3 PhoneNo VARCHAR(15) DEFAULT 'Unknown Phone' NOT NULL,
4 CONSTRAINT MyPrimaryKey PRIMARY KEY (Name)
5 );
Table created.
SQL>
SQL> DROP TABLE myTable;
Table dropped.
Related examples in the same category