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 |
Can a unique index have more than one null value? If not, what error code is given if an attempt is made to insert more than one null value?
What are some characteristics of columns that benefit from indexes?
What is SPUFI?
What is Reorg Recovery? when will you run it?
Suppose pgm A calling Pgm B .Pgm B has some Db2 program. at the time of compilation should plan and package will be created for both A and B or only B? What is the concept?
What r the comman abends in db2, jcl and cobol???????
What is subquery ?
Why cursor is used in db2?
how to resolve -811
How to get Top 10 Salaries from a Table
When you are working with the project after coding what will u do? Like what type of documents u will prepare? How will u do testing?
What is the size of a data page?