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


what is the Foreign key? explain?

Answers were Sorted based on User's Feedback



what is the Foreign key? explain? ..

Answer / gowrinag


FOREIGN KEY YFK (YNO) REFERENCES Y
ON DELETE CASCADE,
FOREIGN KEY ZFK (ZNO) REFERENCES Z
ON DELETE RESTRICT)
IN OZAGENDB.OZAGENTS;

ex:

CREATE TABLE YZ
(YNO CHAR(5) NOT NULL,
ZNO CHAR(5) NOT NULL,
QTYINTEGER,
PRIMARY KEY (YNO,ZNO),
FOREIGN KEY YFK (YNO) REFERENCES Y
ON DELETE CASCADE,
FOREIGN KEY ZFK (ZNO) REFERENCES Z
ON DELETE RESTRICT)
IN OZAGENDB.OZAGENTS;


---------+---------+---------+---------+---------
YNO ZNO QTY
---------+---------+---------+---------+--------
Y1 Z1 300
Y2 Z2 400

Is This Answer Correct ?    2 Yes 1 No

what is the Foreign key? explain? ..

Answer / guest

A foreign key establishes the referential constraint
between a parent table and a dependent table

Is This Answer Correct ?    3 Yes 3 No

Post New Answer

More DB2 Interview Questions

what is a plan and how do you refer the plan in the program?

2 Answers   Xansa,


Why select is not preferred in embedded sql programs?

0 Answers  


how can u retrieve the data from null values using applicaion program.

3 Answers   TCS,


what is consistency token

3 Answers  


What is copy book?

1 Answers   Thomson Reuters,


Is there any advantage to denormalizing DB2 tables?

1 Answers  


What is clone table?

0 Answers  


Are view updateable?

0 Answers  


In a single table,How to retrieve a employee-id of an employee who works in more than one department?

15 Answers   Cap Gemini,


Why might full image copies be faster to implement than an incremental image copy?

4 Answers  


I have 1000 rows in a db2 table.I want to update first 100 records,How do I do it?

4 Answers   CTS,


What do you mean by commit and rollback?

0 Answers  


Categories