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


Please Help Members By Posting Answers For Below Questions

What is the physical storage length of the data types date, time, and timestamp?

1141


What is ibm db2 connect?

1058


How connect db2 database to datastage?

1291


What is table space in db2?

1072


What is a collection in db2?

1095


What are the prerogatives?

1129


Mention the different locking levels that are available in db2.

1187


How to create db2 table in mainframe?

1220


What are the two types of logging in the db2 database? Explain them.

1126


What is the role of union all and union

1190


What is the usage of open cursor command?

1151


What is syscat in db2?

1072


What is buffer pool and list some of them?

1098


How to check last update on table in db2?

1101


What does sqlcabc has?

1100