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 / shankar v
Above one is true but a small correction is needed as below:
CREATE TABLE TB_MANAGER
(EMP-N0 CHAR(6) PRIMARY KEY NOT NULL,
MANAGER CHAR(6) NOT NULL)
IN TABLESPACE;
ALTER TABLE MANAGER
FOREIGN KEY (MANAGER) REFERENCES TB_MANAGER(EMP_NO)
ON DELETE CASCADE;
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
How do I connect my db2 database to ibm?
How do I optimize a query in db2?
What is universal database?
What is dclgen in db2?
What is the maximum size of varchar data type in db2?
How do I start db2 in windows?
What is a collection in db2?
Explain in brief how does db2 determine what lock-size to use?
Is db2 free?
Comment whether the cursor is closed during commit or not.
What is image copy in db2?
What are db2 tables?
What is explain plan in db2?
Describe major components of db2?
Differentiate between cs and rr isolation levels? Where do you specify them?