Answer Posted / 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 |
Post New Answer View All Answers
Define db2.
How to check last update on table in db2?
How to create backup table in db2?
How is deadlock resolved?
What parameters are used to control the free space in DB2?
What is db2 look?
What are the uses of db2 optimizer?
How can you count the number of rows from a table tab?
What does sqlcabc has?
What is cloudant database?
B37 abend during spufi?
How can the firstname and the lastname from the emp table be concatenated to generate complete names?
What is cursor with hold option in db2?
Explain about open switch business continuity software?
What is database manager in db2?