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 |
How does DB2 use multiple table indexes?
Why do we need to create an alias if we can directly use the table name? What are the benefits of referring a table name by its alias? Also, when should we go for alias and when for synonyms?
how does the defining of a stored procedure effect the size of a DB2 data base A) it increases the size of a data base B) it decreases the size of a data base C) it does not effect the size of the data base D) it changes the table space structures
What if , we failed to mentioed null indicator in sql select query , that may retrieve null value ?
Mention the different locking levels that are available in db2.
There is a 5000 EMP in company.how we find out the 5th highest getting salary employee outof 5000 employes........
how many partitions are possible in partitioned tablespace? dont say 1-64. a)240 b)256 c)512 d)none
How do I add a column in db2?
Describe what a storage group(STOGROUP) is?
What are the three DB2 date and time data types and their associated functions?
What is a db2 cursor?
How do you run JCL in cobol program