Given the following DDL for the PARTS table:
CREATE TABLE parts (part_no INT(9) NOT NULL, part_name VARCHAR(24), part_remain INT(9));
All part numbers entered will be different and all rows should be displayed in order of increasing part numbers whenever the table is queried. Which of the following create index statements will meet this criteria and require the least amount of storage for the index object?
A. CREATE UNIQUE INDEXidx_partno ON parts(part_name, part_no ASC)
B. CREATE UNIQUE INDEXidx_partno ON parts(part_name ASC)
C. CREATE UNIQUE INDEXidx_partno ON parts(part_no)
D. CREATE UNIQUE INDEXidx_partno ON parts(part_no, part_name ASC)
正解:C
質問 2:
Which of the following can NOT be used to restrict specific values from being inserted into a column in a particular table?
A. Check constraint
B. Default constraint
C. Index
D. Referential constraint
正解:B
質問 3:
A table named DEPARTMENT has the following columns:
DEPT_ID DEPT_NAME MANAGER AVG_SALARY
Which of the following is the best way to prevent most users from viewing AVG_SALARY data?
A. Create a view that does not contain the AVG_SALARY column
B. Revoke SELECT access for the AVG_SALARY column from users who should not see AVG_SALARY data
C. Store AVG_SALARY data in a separate table and grant SELECT privilege for that table to the appropriate users
D. Encrypt the table's data
正解:A
質問 4:
If the following SQL statements are executed in the order shown:
CREATE TABLE table1 (c1 INTEGER, c2 INTEGER);
INSERT INTO table1 VALUES (123, 456);
UPDATE table1 SET c1 = NULL;
What will be the result of the following statement?
SELECT * FROM table1;
A. C1 C2
NULL 456 1 record(s) selected.
B. C1 C2
-
456
1 record(s) selected.
C. C1 C2
0 456
1 record(s) selected.
D. C1 C2
123 456
1 record(s) selected.
正解:B
質問 5:
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 RIGHT OUTER JOIN tab2 ON c1=cx
C. SELECT * FROM tab1 FULL OUTER JOIN tab2 ON c1=cx
D. SELECT * FROM tab1 LEFT OUTER JOIN tab2 ON c1=cx
正解:B