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
Which component is responsible for processing sql statements and selecting access paths?
what is diffrence b/w file-aid tool and file-aid utility???
What is meant by union and union all?
What is meant by dclgen?
What does db2 stand for?
Why do we bind in db2?
What is iseries database?
Mention the various locks that are available in db2.
How and when does the db2 enforces the unique key?
How is the value function used?
What is check constraint. Explain with example.
How do I import a csv file into db2?
What is schema in db2?
How to find the number of rows in a db2 table?
Is db2 a mainframe database?