what is the Foreign key? explain?
Answers were Sorted based on User's Feedback
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 |
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 |
What is dclgen (declaration generator)?
What is image copy in db2?
What is the physical storage length of time data type?
how to identify the pseudo conversation by seeing the program
db2 maintains information about the data... a.in tables. b.in a set of tables known as db2 catalog. c.in db2 database. d.none of the above.
What is a synonym? How is it used?
What is the difference between IN subselects and EXISTS subselect?
What is dclgen in db2?
Suppose if I need to update a column, how you do that using cursor?
What is RUNSTATS?
what is REORG? what is the use?
what is main use of table space and index object? please its urgent
5 Answers CA, Cap Gemini, CGI, CTS, EDS, HTC, IBM, Satyam, Syntel, TCS, Wipro,