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 are the benefits of using the db2 database?

760


What is dclgen in db2?

776


For a db2 column that is being defined as decimal (11, 2), discuss the cobol picture clause.

749


What is dbrm? When it will be created?

677


What is a db2 tablespace?

688






what is the responsibility of the construction superintendent

1744


Is ibm db2 free?

664


What is copy pending and check pending in db2?

663


In case if at some point of time db2 is down, would that impact the pre-compilation process of a db2-cobol program?

668


What is null indicator in db2?

716


Explain about rct.

744


How do I import data from excel to db2?

702


What is the difference between plan and package in db2?

689


Suppose pgm A calling Pgm B .Pgm B has some Db2 program. at the time of compilation should plan and package will be created for both A and B or only B? What is the concept?

7100


What do you mean by storage group (stogroup)?

682