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 |
When is the authorization check on DB2 objects done - at BIND time or run time?
What are the disadvantages of using VARCHAR?
How to find the number of rows in db2 tables?
What is the purpose of the WHENEVER statement?
what is the process of precompiler?
Which transaction use a command thread ?
What happens to a tablespace when its recovery infromation has been removed and a full recovery is no longer possible?
Hi Dude,this is Ram.could any one tell me aboue CURRENT OF clause in DB2. Thanks in advance.......
in a table consist of 1000 records among that i was updated 145 record how could i know that ..list of recently updated record's and where could i see those updated record's....pls help me out....
cursor with hold explain ?
What is the result of open cursor statement?
Consider that a package is bound into 2 different collections and the PKLIST option specifies both the collections. If the collection id is not specified in the program while executing the SQL query, then when the DB2 system will search the package list, which collection will it pick up or will it give an error/abend?