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 to create backup table in db2?
Explain about open switch business continuity software?
have 3 tables table1, table2 and table3 which contains employee information. table1 is master table, table2 contains emp details like emp no and so on, table 3 contains emp salary. so if any emp leave company between 25th - 30th of every month it has to get updated in tables. but it is not getting updated. What is the reason.
Explain in brief how does db2 determine what lock-size to use?
what is diffrence b/w file-aid tool and file-aid utility???
What is db2 instance?
Explain the benefits you can get from mainframe connect?
What is query_cache_limit?
What do you mean by commit and rollback?
B37 abend during spufi?
Mention the downsides of page level lock.
Why db2 is called db2?
What is collection in db2 bind?
What is the function of logging in the db2 database?
What is table space in db2?