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

What is db2 plan table?

633


How do you find the maximum value in a column in db2?

657


How to check sequence on a table in db2?

609


What do you mean by commit and rollback?

605


What is rct?

760






What is dbrm? What it contains? When it will be created?

599


Is ibm db2 open source?

595


How to find schema of a table in db2?

577


i tried to copy some records from microsoft excel to as-400 physical file through "Bosanova" emulation. Out of 14000 records only 12000 records copies and subsequently programe started to hang. Then, i closed the program forcefully. I did' under stand the problem. Also when i try to compile the physical file it is showing as "The file in use". How to overcome this problem?

2058


How can you do the explain of a dynamic sql statement?

641


If I have a view which is a join of two or more tables, can this view be updateable?

704


Are view updateable?

634


Explain packages.

668


What is view db2?

634


How many databases can be created inside an instance in db2 ?

609