Given the following table:
TAB1 -
COL1 COL2 -
----- -----
A 10 -
B 20 -
C 30 -
D 40 -
E 50 -
And the following SQL statements:
DECLARE c1 CURSOR WITH HOLD FOR -
SELECT * FROM tab1 ORDER BY col_1;
OPEN c1;
FETCH c1;
FETCH c1;
FETCH c1;
COMMIT;
FETCH c1;
CLOSE c1;
FETCH c1;
Which of the following is the last value obtained for COL_2?
Answer : C
Given the following requirements:
Create a table named TESTTAB, which has an identity column named ACTIVITYNO.
Define the identity column to generate the values for the column by default. Start the values at 10 and increment by 10. Makethe identity column unique.
Which of the following CREATE statements will successfully create this table?
Answer : D
Which of the following will provide user USER1 and all members of the group GROUP1 with the ability to perform DML, but no other operations on table TABLE1?
Answer : B
Given the following table definitions:
EMPLOYEE -
ID NAME DEPTID -
-- ------ ---------
01 Smith 10
02 Bossy 20
03 Peterson 20
04 Goss 30
05 Pape 40
06 Avery 50
07 O'Neal 60
08 Carter 50
DEPARTMENT -
ID DEPTNAME -
----------------
05 Hardware
10 Kitchen
20 Shoes
30 Toys
40 Electronics
50 Automotive
and the following query:
SELECT e.id, d.deptname -
FROM employee e, department d -
WHERE e.deptid = d.id AND e.id >4
Which of the following queries will produce the same result set as the query above?
Answer : B
Which authority or privilege is granted by the DB2Database Manager configuration file?
Answer : C
Given the following scenario:
Table TABLE1 needs to hold specific numericvalues up to 9999999.999 in column COL1.
Once TABLE1 is populated, arithmetic operations will be performed on data stored in column COL1.
Which of the following would be the most appropriate DB2 data type to use for column
COL1?
Answer : D
Whichof the following statements eliminates all but one of each set of duplicate rows in the
DEPT column in the STAFF table?
Answer : B
Given that tables T1 and T2 contain the followingrows:
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?
Answer : C
Which of the following products is used to shred extensible markup language documents?
Answer : C
Given the following two tables:
NAMES -
NAME NUMBER -
-------------------------
Wayne Gretzky 99 -
Jaromir Jagr 68 -
Bobby Orr 4 -
Bobby Hull 23 -
Brett Hull 16 -
Mario Lemieux 66 -
Mark Messier 11 -
POINTS -
NAME POINTS -
----------- --------------
Wayne Gretzky 244 -
Jaromir Jagr 168 -
Bobby Orr 129 -
Brett Hull 121 -
Mario Lemieux 189 -
Joe Sakic 94 -
Which of the following statements will display the player name, number, andpoints for all players that have scored points?
Answer : C
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?
Answer : D
Which of the following is TRUE for the DB2 isolation level Cursor Stability (CS)?
Answer : A
If the following SQL statement is executed:
CREATE TABLE sales -
(invoice_no NOT NULL PRIMARYKEY,
sales_date DATE,
sales_amt NUMERIC(7,2))
IN tbsp0, tbsp1, tbsp2, tbsp3 -
PARTITION BY RANGE (sales_date NULLS FIRST)
(STARTING 1/1/2007' ENDING '12/31/2007'
EVERY 3 MONTHS)
Which of the following statements is true?
Answer : B
Which of the following is a characteristic of a sequence?
Answer : B
Given the following table definition:
EMPLOYESS -
--------------------------
EMP ID INTEGER -
NAME CHAR(20)
DEPT CHAR(10)
SALARY DECIMAL (10, 2)
COMMISSION DECIMAL (8, 2)
Assuming the DEPT column contains the values ADMIN, PRODUCTION, and SALES, which of the following statements will produce a result data set in which all ADMIN department employees are grouped together, all PRODUCTION department employees are grouped together, and all SALES department employees are grouped together?
Answer : A
Have any questions or issues ? Please dont hesitate to contact us