Enabling Constraints Assignment Help

Assignment Help: >> Data Integrity - Enabling Constraints

Enabling Constraints

The following CREATE   TABLE and ALTER   TABLE statements both describe and enable integrity constraints:

CREATE TABLE emp (
empno NUMBER(5) PRIMARY KEY,  . . . );
ALTER TABLE emp1
ADD PRIMARY KEY (empno);

The above two statements add the primary key constraint. The first adds the primary key constraint at the time of creation of the table. The next statement tries to add the constraint after the table is created. In this query if the records are not available and the constraint is added. If records are already present then the ALTER TABLE statement will fail.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd