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 / sahil garg
CREATE TABLE TB_MANAGER
(EMPNO CHAR(6) PRIMARY KEY ,
MANAGER CHAR(6) );
ALTER TABLE TB_MANAGER
ADD CONSTRAINT TB_FK FOREIGN KEY (MANAGER) REFERENCES
TB_MANAGER(EMPNO);
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
Hi Everyone... Under the Logical files, when am working on multiple rec format logical file, I have joined two pf's using the multiple record format logical file concept, but when i run queried the LF only the first mentioned pf records are reflecting and I am not able to see any of the field records specified under the second pf. Kindly let me know whats the reason behind this. Below is the str of LF., R rec PFILE(LOGICAA) CUSTNO CUSTNAME BILL K CUSTNO R rec1 PFILE(LOGICAA1) CUSTNO ADD K CUSTNO .....
How to create backup table in db2?
What is the usage of open cursor command?
Define db2.
Explain about open switch business continuity software?
What is a db2 cursor?
What is the maximum size of a char data type in db2?
What is dbrm library?
What are iseries servers?
What is check constraint in db2?
What is a db2 tablespace?
Why select is not preferred in embedded sql programs?
What types of tables are there in the db2 database?
What is the physical storage length of the data types date, time, and timestamp?
What is multi row fetch in db2?