DBA > Job Interview Questions > DB2 ( IBM Database 2 ) Interview Questions

How do I create a table MANAGER ...

More DBA job interview questions and answers at http://dba.fyicenter.com/Interview-Questions/

(Continued from previous question...)

How do I create a table MANAGER ...

Q: 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.

AN:
First CREATE MANAGER table with EMP-NO as the primary key. Then ALTER it to define the foreign key.

(Continued on next question...)

Other Job Interview Questions