RelationalDBDesignRelationalDBDesign


Managing Constraints   «Prev 

Primary Keys of a Table in Oracle

This short version of the auction table contains five rows, each with its own unique, non-NULL value for the auction_id table

A user adds a new row to the auction table that has a value for the auction_id column unique to the table.

The row is successfully inserted into the table.

A user attempts to insert a row into the auction table that has a non-unique value for the auction_id column.

The INSERT operation fails with an error, because a unique constraint has been violated.

A user tries to update a row, but makes the value of the auction_id NULL.

The UPDATE operaiton fails with an error, because the non-NULL constraint has been violated.