Professional Documents
Culture Documents
----------------------------------- -------FNAME MNAME LNAME SSN BDATE ADDRESS SEX SALARY SUPERSSN DEPNO NOT NULL
SQL> alter table employee modify(FName VARCHAR(15) constraint FName_NN NOT NULL);
Table altered.
. SQL> alter table employee modify(LName VARCHAR(15) constraint LName_NN NOT NULL);
Table altered.
Table altered.
.SQL> alter table employee add constraint Spr_SSN_FK FOREIGN KEY(SuperSSN) REFERENCES employee(SSN) on
delete set NULL; Table altered.
SPR_SSN_FK DEPNO_FK
R R
SQL> alter table department modify(DName VARCHAR(15) constraint LName_NN NOT NULL);
Table altered.
.SQL> alter table department add constraint Mgr_SSN_FK FOREIGN KEY(MgrSSN) REFERENCES employee(SSN) on
delete set NULL; Table altered.
.SQL> alter table employee add constraint DepNo_FK FOREIGN KEY(DepNo) REFERENCES department(DepNo) ON
DELETE CASCADE; Table altered.
-------------------------------- --------------