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 |
Mention the location where the output received from explain statement is stored.
What are concurrency issues?
How can you get the number of rows impacted by the last executed query?
What is the format (internal layout) of ?TIMESTAMP??
In an sql table that is embedded, what is the procedure to retrieve rows that are part of a db2 table?
When is the authorization check on DB2 objects done - at BIND time or run time?
Can DASD types assigned to storage groups be intermixed (i.e., 3350s and 3380s)?
database DSNDB01 means a.db2 catalog b.db2 directory c.BSDS d.active logs answer with reason please
What is a db2 tablespace?
What is db2? Explain.
How do I start db2 in windows?
How to resolve -407 sql code in DB2?