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 ();


Popular posts from this blog

Hibernate - HibernateException: createQuery is not valid without active transaction