Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 / shankar v

Above one is true but a small correction is needed as below:

CREATE TABLE TB_MANAGER
(EMP-N0 CHAR(6) PRIMARY KEY NOT NULL,
MANAGER CHAR(6) NOT NULL)
IN TABLESPACE;

ALTER TABLE MANAGER
FOREIGN KEY (MANAGER) REFERENCES TB_MANAGER(EMP_NO)
ON DELETE CASCADE;

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can one database have multiple instances?

1054


What is buffer pool in the db2 database?

1108


Give the name of some fields form sqlca.

1086


How can record locking be achieved in those DB2 versions which do not support it?

1078


How to find schema of a table in db2?

1016


How to rename a table in DB2 ?

1088


What is db2 bind?

1084


What are the benefits of using the db2 database?

1229


What is the cobol picture clause of the db2 data types date, time, timestamp?

1068


What is dpf in db2?

1111


What is the difference between spufi and qmf?

1134


What are types of indexes?

1076


Explain about cursor stability?

1052


What is db2 look?

1026


Define predicate?

1139