Set primary key when declaring a column : Create Primary Key « Constraints « Oracle PL / SQL






Set primary key when declaring a column

    
SQL>
SQL> create table t
  2  ( x int primary key ,
  3    y date,
  4    z clob )
  5  /

Table created.

SQL>
SQL> drop table t;

Table dropped.

SQL>

   
    
    
    
  








Related examples in the same category

1.Using a CREATE TABLE statement: create a table with primary key
2.Create a foreign key "set null on delete" with more than one field, and use desc to check
3.Violate the primary key and foreign key relation
4.ORA-12991: column is referenced in a multi-column constraint
5.One-to-one using a primary-key and foreign-key relationship
6.Use three columns as primary key