Managing Constraints   «Prev 

Using Primary Keys in OracleTable

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

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


3) The row is successfully inserted into the table.

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


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

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

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