Oracle - Alter Table, add primary key constraint

The primary key its a constraint that specifies that the value of the field fully identifies the row in the table, that is, the value is the "key" to he table. And so this constraint will not permit duplicate or null values int that field.

Its possible to specify more than one field as primary key.

Next, there's a script for defining a primary key in a already existing table.

alter table add primary key ();

Comments

Popular posts from this blog

Oracle - duplicate fields in RECORD,TABLE or argument list are not permitted

Oracle - ORA-29282: invalid file ID, ORA-06512: at "SYS.UTL_FILE"