Which of the following will be a consequence of defining the column IDCOL2 in TABLE2 as a foreign key referencing the primary key (IDCOL1) of TABLE1?
A. When a SELECT statement joins TABLE1 with TABLE2, DB2 will automatically add the condition TABLE1.IDCOL1=TABLE2.IDCOL2 if not specified in the statement.
B. When inserting a row in TABLE2, the only values that DB2 will allow for IDCOL2 are the existing values of IDCOL1.
C. DB2 will no longer allow updating the value of IDCOL1 in TABLE1.
D. When inserting a row in TABLE2, DB2 will only allow foreign values forIDCOL2, that is values which do not exist in IDCOL1.
正解:B
質問 2:
Given the requirements to store employee names, employee numbers, and when employees were hired, which of the following built-in data types CANNOT be used to store the day an employee was hired?
A. Varying-Length Character String
B. Character Large Object
C. Timestamp
D. Time
正解:D
質問 3:
Which of the following is NOT an attribute of Declared Global Temporary Tables (DGTTs)?
A. DGTTs can only be used by the application that creates them, and only for the life of the application
B. Each application that defines a DGTT has its own instance of the DGTT
C. Two different applications cannot create DGTTs that have the same name
D. Data stored in a DGTT can exist across transaction boundaries
正解:C
質問 4:
Given the following table:
TAB1
COL1 COL2
A 10 B 20 C 30 A 10 D 40 C 30
Assuming the following results are desired:
TAB1
COL1 COL2
A 10 B 20 C 30 D 40
Which of the following statements will produce the desired results?
A. SELECT DISTINCT * FROM tab1
B. SELECTDISTINCT(*) FROM tab1
C. SELECTUNIQUE(*) FROM tab1
D. SELECT UNIQUE * FROM tab1
正解:A
質問 5:
Which type of key is defined on the child table to implement a referential constraint?
A. Foreign key
B. Composite key
C. Primary key
D. Unique key
正解:A