A.The list of column names in the FOREIGN KEY clause can be a subset of the list of column names in the primary key of T2 or a UNIQUE constraint that exists on T2.
B.The list of column names in the FOREIGN KEY clause can be a subset of the list of column names in the primary key of T1 or a UNIQUE constraint that exists on T1.
C.The list of column names in the FOREIGN KEY clause must be identical to the list of column names in the primary key of T2 or a UNIQUE constraint that exists on T2.
D.The list of column names in the FOREIGN KEY clause must be identical to the list of column names in the primary key of T1 or a UNIQUE constraint that exists on T1.
您可能感兴趣的试卷
你可能感兴趣的试题
Given the following two tables:
TAB1 C1 C2
A 11 B 12 C 13 TAB2 CX CY
A 21 C 22 D 23
The following results are desired:
C1 C2 CX CY
A 11 A 21 C 13 C 22 -- --D 23
Which of the following queries will yield the desired results?()
A.SELECT * FROM tab1 INNER JOIN tab2 ON c1=cx
B.SELECT * FROM tab1 LEFT OUTER JOIN tab2 ON c1=cx
C.SELECT * FROM tab1 FULL OUTER JOIN tab2 ON c1=cx
D.SELECT * FROM tab1 RIGHT OUTER JOIN tab2 ON c1=cx
Given the following two tables:
TAB1 R1
A A A B B C C D E TAB2 R2
A A B B C C D
Which of the following queries returns the following result set? RETVAL E()
A.SELECT r1 AS retval FROM tab1 INTERSECT SELECT r2 AS retval FROM tab2
B.SELECT r1 AS retval FROM tab1 EXCEPT SELECT r2 AS retval FROM tab2
C.SELECT DISTINCT r1 AS retval FROM tab1, tab2 WHERE r1 <> r2
D.SELECT r1 AS retval FROM tab1 UNION SELECT r2 AS retval FROM tab2
CREATE TABLE customer (cid BIGINT NOT NULL PRIMARY KEY, info XML) How many names will be returned for this XQuery?()
A.0
B.1
C.2
D.3
A.SELECT * FROM t1 UNION SELECT * FROM t2
B.SELECT * FROM t1 UNION DISTINCT SELECT * FROM t2
C.SELECT * FROM t1 INTERSECT SELECT * FROM t2
D.SELECT * FROM t1 WHERE (c1,c2)= (SELECT c1,c2 FROM t2)
Given the following table definition:
STOCK: item VARCHAR(30) status CHAR(1) quantity INT price DEC(7,2)
If items are indicated to be out of stock by setting STATUS to NULL and QUANTITY and PRICE to zero, which of the following statements would be used to update the STOCK table to indicate that all the items whose description begins with the letter "S" are out of stock?()
A.UPDATE stock SET (status = NULL; quantity, price = 0) WHERE item LIKE S%
B.UPDATE stock SET (status, quantity, price) = (NULL, 0, 0) WHERE item LIKE S%
C.UPDATE stock SET status = NULL, SET quantity = 0, SET price = 0 WHERE item LIKE 'S%'
D.UPDATE stock SET (status = NULL), (quantity = 0), (price = 0) WHERE item LIKE S%
The EMPLOYEE table contains the following information: EMPNO NAME WORKDEPT
101 SAM A11 102 JOHN C12 103 JANE -104 PAT Remote
105 ANNE -106 BOB A11
The MANAGER table contains the following information: MGRID NAME DEPTNO EMPCOUNT
1 WU B01 - 2 JONES A11 - 3 CHEN - - 4 SMITH - -5 THOMAS C12 -
After this statement is executed: UPDATE manager m SET empcount = (SELECT COUNT(workdept) FROM employee e WHERE workdept=m.deptno)
What is the result of the following query?()
SELECT mgrid, empcount FROM MANAGER WHERE empcount IS NOT NULL ORDER BY mgrid
A. MGRID EMPCOUNT ----- -------- 1 0 2 2 5 1
B. MGRID EMPCOUNT ----- -------- 1 0 2 2 3 0 4 0 5 1
C. MGRID EMPCOUNT ----- -------- 1 3 2 3 3 3 4 3 5 3
D. MGRID EMPCOUNT ----- -------- 1 0 2 2 3 2 4 2 5 1
A.The CONNECT statement
B.The first FETCH of a cursor
C.The BEGIN TRANSACTION statement
D.The first executable SQL statement
Given that tables T1 and T2 contain the following rows:
Table T1: C1 C2 1 4 1 3 1 2
Table T2: C1 C2 1 1 1 2 1 3
Which of the following queries will return only those rows that exist in both T1 and T2?()
A.SELECT * FROM t1 UNION SELECT * FROM t2
B.SELECT * FROM t1 UNION DISTINCT SELECT * FROM t2
C.SELECT * FROM t1 INTERSECT SELECT * FROM t2
D.SELECT * FROM t1 WHERE (c1,c2)= (SELECT c1,c2 FROM t2)
A.Row
B.Table
C.Scalar
D.Column
A.CALL increase_salary('A00')
B.VALUES increase_salary('A00')
C.CALL increase_salary('A00', ?)
D.VALUES increase_salary('A00', ?)
最新试题
A user utilizing an alias to update a subset of columns in a table must have UPDATE privileges on which of the following DB2 objects?()
What type of constraint is used to ensure that each row inserted into the EMPLOYEE table with a value in the WORKDEPT column has a row with a corresponding value in the DEPTNO column of the DEPARTMENT table?()
Which of the following actions may cause a trigger to be fired?()
Which of the following describes the objects of a DB2 database and their relationships?()
Which of the following will begin a new unit of work?()
On which of the following database objects may the SELECT privilege be controlled?()
An application needs a table for each connection that tracks the ID and Name of all items previously ordered and committed within the connection. The table also needs to be cleaned up and automatically removed each time a connection is ended. Assuming the ITEMS table was created with the following SQL statement:CREATE TABLE items item_no INT, item_name CHAR(5), item_qty INT)Which of the following SQL statements will provide the table definition that meets the specified requirements?()
The EMPLOYEE table contains the following information: EMPNO NAME WORKDEPT101 SAM A11 102 JOHN C12 103 JANE -104 PAT Remote105 ANNE -106 BOB A11The MANAGER table contains the following information: MGRID NAME DEPTNO EMPCOUNT1 WU B01 - 2 JONES A11 - 3 CHEN - - 4 SMITH - -5 THOMAS C12 -After this statement is executed: UPDATE manager m SET empcount = (SELECT COUNT(workdept) FROM employee e WHERE workdept=m.deptno)What is the result of the following query?()SELECT mgrid, empcount FROM MANAGER WHERE empcount IS NOT NULL ORDER BY mgrid
A UDT is a data type which:()
Given the following table definition:STOCK: item VARCHAR(30) status CHAR(1) quantity INT price DEC(7,2)If items are indicated to be out of stock by setting STATUS to NULL and QUANTITY and PRICE to zero, which of the following statements would be used to update the STOCK table to indicate that all the items whose description begins with the letter "S" are out of stock?()