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
Can we insert update delete in view?
What is netezza database?
List out the three types of page locks that can be held.
Hi, i would like to start a new carrier in DB2 DBA.Which and what all step should i have to take..?
What is bind plan?
What is db2 bind process?
What is a db2 table?
How do I delete a column in db2?
Which isolation level provides highest data integrity?
How can we read records for specific member in CL? AND rpg?
How do I delete a table in database?
What are the prerogatives?
What is db2 purescale?
What is the difference between drop table and delete table?
What is explain in db2?