How do I create a table MANAGER (EMP-NO, MANAGER) where
MANAGER is a foreign key which references to EMP-NO in the
same table? Give the exact DDL.

Answer Posted / s

CREATE TABLE QUALIFIER.TABLE
(EMP-N0 CHAR(6) NOT NULL,
MANAGER CHAR(6) NOT NULL)
IN TABLESPACE;

ALTER TABLE QUALIFIER.TABLE
FOREIGN KEY FKM (MANAGER) REFERENCES QUALIFIER.TABLE
ON DELETE CASCADE;

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the contention situations caused by locks?

589


How to retrieve rows from a db2 table in embedded sql?

721


Why do we bind in db2?

630


What is the difference between dbm cfg and db cfg file in db2 ?

1001


What is the difference between cursor stability and repeatable read isolation levels?

678






What is role in db2?

613


What is the information associated with sysibm.syslinks table?

657


Which command is used to remove all rows from a table?

552


What is node in db2?

606


What is the use of value function?

622


How do you eliminate duplicate values in db2?

679


What does db2 plan contain?

572


Explain the function of data manager.

632


What is the cobol picture clause of the db2 data types date, time, timestamp?

612


Define data page.

628