Contents Index Integrity checking Inserting values that violate relationships

ASA Getting Started
  Updating the Database
    Integrity checking

Inserting duplicate data


For example, suppose you attempt to create a department, but supply a dept_id value that is already in use:

To do this, enter the command:

INSERT
INTO department ( dept_id, dept_name, dept_head_id )
VALUES ( 200, 'Eastern Sales', 902 )

The INSERT is rejected as it would make the primary key for the table not unique. Since dept_id field is a primary key, duplicate values are not permitted.


Contents Index Integrity checking Inserting values that violate relationships