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

How do I connect my db2 database to ibm?

1046


How do I optimize a query in db2?

1095


What is universal database?

1066


What is dclgen in db2?

1143


What is the maximum size of varchar data type in db2?

1131


How do I start db2 in windows?

1087


What is a collection in db2?

1032


Explain in brief how does db2 determine what lock-size to use?

1038


Is db2 free?

1094


Comment whether the cursor is closed during commit or not.

1098


What is image copy in db2?

1011


What are db2 tables?

1123


What is explain plan in db2?

989


Describe major components of db2?

1090


Differentiate between cs and rr isolation levels? Where do you specify them?

1067