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

How do you stop a db2 database in linux?

0 Answers  


What can the SET option of the Repair Utility accomplish?

1 Answers  


What is check constraint in db2?

0 Answers  


What techniques will be used to avoid deadlock??

5 Answers   IBM, SUN,


Can a primary key have null values? If we try to insert a null value in a primary key column, will it work or give an error code?

6 Answers  


How do run the JCL which has 25 steps by skipping the following steps 5, 10,15 and 25 without using COND statement

5 Answers   Syntel,


What is the difference between static and dynamic SQL?

1 Answers  


What is pagespace?

1 Answers  


How connect db2 database to datastage?

0 Answers  


What is a predicate?

1 Answers  


What is DYNSLT keyword? How do you perform selection using DYNSLT

1 Answers  


What is db2? Explain.

0 Answers  


Categories