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
What is the difference between drop table and delete table?
What is the physical storage length of the data types: date, time, timestamp in the db2 database?
What is db2 and what is the use of db2 optimizer?
What is db2 look?
What is netezza database?
In an sql table that is embedded, what is the procedure to retrieve rows that are part of a db2 table?
What is declare cursor?
What is rebind in db2?
How can tablespace be moved to another dasd volume that is allocated for that tablespace?
What is the purpose of using commit?
How do I create a view in db2?
What is runstats and reorg in db2?
Give a brief description of db2 isolation levels?
Is it possible using max on a char column?
What is the role of union all and union