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
How to find primary key of a table in db2?
What is nvl in db2?
What is a storage group (stogroup)?
How can we read records for specific member in CL? AND rpg?
Suppose pgm A calling Pgm B .Pgm B has some Db2 program. at the time of compilation should plan and package will be created for both A and B or only B? What is the concept?
Explain the function done by data manager?
What is dbrm library?
What is db2?
How do I change the column size in db2?
What is null indicator in cobol db2?
List down the data types in the db2 database.
How to find the number of rows in a db2 table?
What is the result of open cursor statement?
What are the 2 sqlcodes that are returned?
What are the two types of logging in the db2 database? Explain them.