Professional Documents
Culture Documents
9) J. the tables :
Country
ID name person cities
1 Argentina 1 10
2 Canada 2 20
3 Cuba 2 10
4 Germany 1 0
7 5 5 France
Staff
ID LastName
1 Jones
2 Smith
Points
Name Points
Wayne Gretzky 244
Jaromir Jagr 168
Bobby Orr 129
Bobby Hull 93
Brett Hull 121
Mario Lemieux 189
PIM
Name PIM
Mats Sundin 14
Bobby Orr 12
Mark Messier 32
Brett Hull 66
Mario Lemieux 23
Joe Sakic 94
Which of the following statements will display the player 's
Names, numbers, p
Oints and
PIM for all players with an entry in all three tables?
A) select names.name, names.number, points.points,
pim.pim from names InnER join points inner join on
names.name=points.name pim on pim.name=names.namE
Dept
Dept_id dept_name
1 Planning
1 Support
And the statement :
Alter table employee
Add unit key (dept) references (dept_id)
On delete Cascade
STAFF
ID LASTNAME
1 Jones
2 Smith
The statement:
INSERT INTO staff SELECT person, 'Greyson' FROM country
WHERE person >; 1
will insert how many rows into the STAFF table?
a) 0
b) 1
c) 2
d) 3
33) Which of the following delete rules will not allow a row
to be deleted from the parent table if a row with the
corresponding key value still exists in the child table?
a) DELETE
b) CASCADE
c) RESTRICT
d) SET NULL
ORG
deptnumb INTEGER
deptname CHAR(30)
manager INTEGER
division CHAR(30)
location CHAR(30)
STAFF
id INTEGER
name CHAR(30)
dept INTEGER
job CHAR(30)
years CHAR(30)
salary DECIMAL(10,2)
comm DECIMAL(10,2)
(3/55) Which of the following DB2 CLP options specify the file
that contains
The doubtful to be executed?
(Select the correct response)
A. -f
B. -b
C. -o
D. -w
(15/55) Using the Control Center Create Table dialog box, which
of the follow Networking dialogs allows The table creation DDL to
be viewed?
(Select the correct response)
A. Copy
B. Show SQL
C. Show Related
D. Haphazard Contents
PIM
Name PIM
Mats Sundin 14
Jaromir Jagr 18
Bobby Orr 12
Mark Messier 32
Brett Hull 66
Mario Lemieux 23
Joe Sakic 94
EMPLOYEE
empno INTEGER
firstname CHAR(30)
midinit CHAR
lastname CHAR(30)
workdept CHAR(3)
DEFIN2:
deptid SMALLINT NOT NULL
name VARCHAR(30)
started DATE
Table2
col1 INT
col2 CHAR(30)
ROLLBACK COMMIT
If there exists one (1) row in table mytab before the programs
are executed concurrently,
how many records will be in the table once the programs
complete?
(Select the correct response)
A. 0
B. 1
C. 2
D. 3
E. 4
(53/55) Which of the following isolation levels will lock only the
rows returned in the result set?
(Select the correct response)
A. Read Stability
B. Repeatable Read
C. Cursor Stability
D. Uncommitted Read
(2/55) Which of the following DB2 CLP options specify the file
that contains
The doubtful to be executed?
(Select the correct response)
A. -F
B. -B
C. -O
D. -W
Table2
Col1 INT
Col2 Char (30)
Which of the following statements will insert all the rows in
TABLE2 into tab
LE1?
(Select the correct response)
A. Insert into table1 select col1, col2 from table2
B. Insert into table1 as select col1, col2 from table2
C. Insert into table1 values (table2.col1, table2.col2)
D. Insert into table1 values (select col1, col2 from table2)
E. Insert into table1 (col1,col2) values (select col1,col2 from
table2)
(19/55) Which of the following isolation levels will install only the
rows retUrned in the result set?
(Select the correct response)
A. Read Stability
B. Repeatable Read
C. Cursor Stability
D. Uncommitted Read
PIM
Name PIM
Mats Sundin 14
Jaromir Jagr 18
Bobby Orr 12
Mark Messier 32
Brett Hull 66
Mario Lemieux 23
Joe Sakic 94
Which of the following statements will display the player's
Names, points and
PIM for all players?
(Select the correct response)
A. SELECT points.name, points.points, pim.name, pim.pim
FROM points INNER JOI
N pim ON points.name=pim.name
B. SELECT points.name, points.points, pim.name, pim.pim
FROM points FULL OUTE
R JOIN pim ON points.name=pim.name
C. SELECT points.name, points.points, pim.name, pim.pim
FROM points LEFT OUTE
R JOIN pim ON points.name=pim.name
D. SELECT points.name, points.points, pim.name, pim.pim
FROM points RIGHT OUT
ER JOIN pim ON points.name=pim.name
Table2
col1 INT
col2 CHAR(30)
Which of the following statements will insert all the rows in
TABLE2 into TAB
LE1?
(Select the correct response)
A. INSERT INTO table1 SELECT col1, col2 FROM table2
B. INSERT INTO table1 AS SELECT col1, col2 FROM table2
C. INSERT INTO table1 VALUES (table2.col1, table2.col2)
D. INSERT INTO table1 VALUES (SELECT col1, col2 FROM
table2)
E. INSERT INTO table1 (col1,col2) VALUES (SELECT
col1,col2 FROM table2)
EMPLOYEE
Empno INTEGER
Firstname CHAR(30)
Midinit CHAR
Lastname CHAR(30)
Workdept CHAR(3)
Which of the following statements will list the employee's
employee number, last name, and department name ONLY for
those employees who have a department?
Pgm1
Mytab insert into values (. . . )
Commit
Mytab insert into values (. . . )
Rollback
Pgm2
Mytab insert into values (. . . )
Rollback
Mytab insert into values (. . . )
Commit
How many records will be successfully inserted and retained in
the table myta
B?
(Select the correct response)
A. 1
B. 2
C. 3
D. 4
(8/55) J. the following DDL statement :
Create table newtab1 like tab1
Which of the following would occur as a result of the statement
execution?
(Select the correct response)
A NEWTAB1 has same triggers as TAB1
B NEWTAB1 is populated with TAB1 data
C NEWTAB1 has the same primary key as TAB1
D NEWTAB1 columns have same attributes as TAB1
(19/55) Which of the following types of DB2 locks allows for the
most concurRency within a table?
(Select the correct response)
A. A row lock
B. A page users
C. A field users
D. A column lock
Tablea Tableb
Empid name empid weeknumber paycheck
1 1 1 1000.00 Joe
1 2 2 Bob 1000.00
2 1 2000.00
Tableb was defined as follows :
Create table tableb (empid Char (3), weeknumber Char (3),
paycheck Decimal (6,2)
,
Constraint const1 unit key (empid)
References tablea (empid) on delete set null)
How many rows would be deleted from tableb if the following
command is issued
:
Delete from tablea where empid = 'two'?
Points
Name Points
Wayne Gretzky 244
Jaromir Jagr 168
Bobby Orr 129
Bobby Hull 93
Brett Hull 121
Mario Lemieux 189
Joe Sakic 94
Which of the following statements will display the player 's
Names, numbers an
D points for all players with an entry in both tables?
(Select the correct response)
A. SELECT names.names, names.number, points.points
FROM names INNER JOIN poin
ts ON names.name=points.name
B. SELECT names.name, names.number, points.points FROM
names FULL OUTER JOIN
points ON names.name=points.name
C. SELECT names.name, names.number, points.points
FROM names LEFT OUTER JOIN
points ON names.name=points.name
D. SELECT names.name, names.number, points.points
FROM names RIGHT OUTER JOIN
points ON names.name=points.name
STAFF
Id INTEGER
Name CHAR(30)
Dept INTEGER
Job CHAR(20)
Years INTEGER
Salary DECIMAL(10,2)
Comm. DECIMAL(10,2)
Which of the following statements will display each department,
by name, and the total salary of all employees in the
department?
(Select the correct response)
A. SELECT a.deptname, SUM(b.salary) FROM org a, staff b
WHERE a.deptnumb=b.de
pt ORDER BY a.deptname
B. SELECT b.deptname, SUM(a.salary) FROM org a, staff b
WHERE a.deptnumb=b.de
pt ORDER BY a.deptname
C. SELECT a.deptname, SUM(b.salary) FROM org a, staff b
WHERE a.deptnumb=b.de
pt GROUP BY a.deptname
D. SELECT b.deptname, SUM(a.salary) FROM org a, staff b
WHERE a.deptnumb=b.de
pt GROUP BY a.deptname
(43/55) Which of the following tools allows the DBA to set limits,
and be alerted if these limits are exceeded?
(Select the correct response)
A. DB2 Index Wizard
B. DB2 Script Center
C. DB2 Command Center
D. DB2 Performance Monitor
A. Dbadm
B. Dbctrl
C. Sysadm
D. Dbmaint
E. Alterin
F. Sysmaint
Points
Name Points
Wayne Gretzky 244
Jaromir Jagr 168
Bobby Orr 129
Bobby Hull 93
Brett Hull 121
Mario Lemieux 189
Joe Sakic 94
Staff
ID LastName
1 Jones
2 Smith
The statement :
Select * from staff, country
Will return how many rows?
(Select the correct response)
A. 2
B. 4
C. 5
D. 7
E. 10
(33/55) Which of the following types of DB2 locks allows for the
most concur
rency within a table?
(Select the correct response)
A. A row lock
B. A page lock
C. A field lock
D. A column lock
TABLEA TABLEB
empid name empid weeknumber paycheck
1 JOE 1 1 1000.00
2 BOB 1 2 1000.00
2 1 2000.00
STAFF
id INTEGER
name CHAR(30)
dept INTEGER
job CHAR(20)
years INTEGER
salary DECIMAL(10,2)
comm DECIMAL(10,2)
(48/55) Which of the following DB2 UDB isolation levels will NOT
lock any rows during read processing?
(Select the correct response)
A. Read Stability
B. Repeatable Read
C. Uncommited Read
D. Cursor Stability
(50/55) Which of the following tools allows the DBA to set limits,
and be alerted if these limits are exceeded?
(Select the correct response)
A. DB2 Index Wizard
B. DB2 Script Center
C. DB2 Command Center
D. DB2 Performance Monitor
Pgm2
INSERT INTO mytab VALUES (...)
ROLLBACK
INSERT INTO mytab VALUES (...)
COMMIT
How many records will be successfully inserted and retained in
the table mytab?
(Select the correct response)
A. 1
B. 2
C. 3
D. 4
3. J. the tables :
Tablea Tableb
Empid name empid weeknumber paycheck
1 1 1 1000.00 Joe
1 2 2 Bob 1000.00
2 1 1000.00
Tableb was defined as follows :
Create table tableb (empid Char (3), weeknumber Char (3),
paycheck Decimal (6,2)
,
Constraint const1 unit key (empid)
References tablea (empid) on delete set null)
How many rows would be deleted from tableb if the following
command is issued
:
Delete from tablea where empid = 'two'?
(Select the correct response)
A.0
B.1
C.2
D.3
12. Which of the following tools allows the DBA to set limits, and
be alerted
If these limits are exceeded?
(Select the correct response)
A. DB2 Index Wizard
B. DB2 Script Center
C. DB2 Command Center
D. DB2 Performance Monitor
18. Which of the following utilities can examine a table and its
indexes and
Update the system catalogs with the table 's statistical
information?
(Select the correct response
A. Runstats
B. Getstats
C. Check index
D. Chkstats
20. Which two of the following SQL data types should be used to
store binary
Data?
(Select all that apply
A. Clob
B. Blob
C. Varchar
D. Graphic
E. Varchar for bit data
Points
Name points
Wayne Gretzky 244
Jaromir Jagr 168
Bobby Orr 129
Bobby Hull 93
Brett Hull 121
Mario Lemieux 189
Joe Sakic 94
Which of the following statements will display the player 's
Names, numbers an
D points for all players with an entry in both tables?
(Select the correct response)
A. Select names.names, names.number, points.points from
names inner join poin
T on names.name=points.name
B. Select names.name, names.number, points.points from names
full outer join
Points on names.name=points.name
C. Select names.name, names.number, names points.points from
left outer join
Points on names.name=points.name
D. Select names.name, names.number, points.points names
right from outer join
Points on names.name=points.name
Pgm2
INSERT INTO mytab VALUES (...)
ROLLBACK
INSERT INTO mytab VALUES (...)
COMMIT
How many records will be successfully inserted and retained in
the table myta
b?
(Select the correct response)
A.1
B.2
C.3
D.4
35. User2 has DBADM authority on database DB1. This allows the
user to do which of the following?
(Select the correct response)
A. Drop database DB1
B. Backup database DB1
C. Create tables in any database
D. Create tables in database DB1
STAFF
Id INTEGER
Name CHAR(30)
Dept INTEGER
Job CHAR(20)
Years INTEGER
Salary DECIMAL(10,2)
Comm. DECIMAL(10,2)
Which of the following statements will display each department,
by name, and
the total salary of all employees in the department?
(Select the correct response)
A. SELECT a.deptname, SUM(b.salary) FROM org a, staff b
WHERE a.deptnumb=b.de
pt ORDER BY a.deptname
B. SELECT b.deptname, SUM(a.salary) FROM org a, staff b
WHERE a.deptnumb=b.de
pt ORDER BY a.deptname
C. SELECT a.deptname, SUM(b.salary) FROM org a, staff b
WHERE a.deptnumb=b.de
pt GROUP BY a.deptname
D. SELECT b.deptname, SUM(a.salary) FROM org a, staff b
WHERE a.deptnumb=b.de
pt GROUP BY a.deptname
46. Which of the following types of DB2 locks allows for the most
concurrency
within a table?
(Select the correct response
A. A row lock
B. A page lock
C. A field lock
D. A column lock
53. Which of the following SQL statements can remove all rows
from a table na
med COUNTRY?
(Select the correct response)
A. DELETE country
B. DELETE FROM country
C. DELETE * FROM country
D. DELETE ALL FROM country
55.To set up a client that can access DB2 UDB through DB2
Connect Enterprise
Edition, which of the following is the minimum software client
that must be
installed?
(Select the correct response)
A. DB2 Runtime Client
B. DB2 Personal Edition
C. DB2 Administration Client
D. DB2 Application Developer's Client
7. J. the following :
A table containing a list of all known on an airplane. A seat
consists of as
Eat number and whether or not it is assigned. An airline agent
lists all the
Unassigned known on the incident. When the agent refreshes the
list from the tab
Le, it should only change if another agent unassigns a currently
assigned sea
T.
Which of the following isolation levels should be used for this
application?
11. Which of the following isolation levels will install only the
rows returned In the result set?
A. Read Stability
B. Repeatable Read
C. Cursor Stability
D. Uncommitted Read
12. J. the following table definitions
English
Deptno Char (3)
Deptname Char (30)
Mgrno Michael
Admrdept Char (3)
Employee
Empno Michael
Firstname Char (30)
Mr. Midinit
Lastname Char (30)
Workdept Char (3)
Which of the following statements will list the employee 's
employee number, lAst name, and meaning name only for those
employees who have a department?
A. Select e.empno, e.lastname, d.deptname from employee e,
meaning d where
E.workdept = d.deptno
B. Select e.empno, e.lastname, d.deptname from employee e left
outer join depArtment d = d.deptno on e.workdept
C. Select e.empno, e.lastname, d.deptname from employee e full
outer join depArtment d = d.deptno on e.workdept
D. Select e.empno, e.lastname, d.deptname from employee e
right outer join de
Where e.workdept partment d = d.deptno
16. J. table T1 with 100 rows, which of the following queries will
retrievE 10 rows from table T1?
(Select the correct response)
A. Select * from t1 maximum 10 rows
B. Select * from t1 � 10 rows only
C. Select * from t1 optimize for 10 rows
D. Select * from t1 fetch 10 rows only die
20. How many DB2 Administration Server (Das) Value can be set
up per phys
Ical machine?
(Select the correct response)
A.0
B.1
C. One for each instance on the physical machine
D. One for each database on the physical machine
24. Which of the following is the best way to restrict user access
to a subset of columns in a table?
(Select the correct response)
A. Only grant access to the columns within a table that a user is
allowed to see.
B. Create a view that only includes the columns a user is allowed
to see. Grant the user access to the view, not the base table.
C. Create two tables: one with the columns that a user is allowed
to see, and one that has the confidential columns, and use a join
when all data must be presented.
D. Create two tables: one with the columns that a user is allowed
to see, and one that has the confidential columns, and use a
union when all data must be presented.
31. Using the Control Center Create Table dialog box, which of
the following
dialogs allows the table creation DDL to be viewed?
(Select the correct response
A. Copy
B. Show SQL
C. Show Related
D. Sample Contents
32. Which of the following DB2 CLP options specify the file that
contains the
statements to be executed?
(Select the correct response)
A. –f
B.-b
C.-o
D.-w
34. Which two of the following modes can be used on the lock
table statement?
36. Which of the following is possible once a user has been given
maintenance
authority?
A. DB2 userids can be created.
B. Views can be created on the catalogs.
C. Statistics can be collected for database objects
D. A table can be populated by using the LOAD command.
37. Given the two following tables:
Points
Name Points
Wayne Gretzky 244
Jaromir Jagr 168
Bobby Orr 129
Bobby Hull 93
Brett Hull 121
Mario Lemieux 189
PIM
Name PIM
Mats Sundin 14
Jaromir Jagr 18
Bobby Orr 12
Mark Messier 32
Brett Hull 66
Mario Lemieux 23
Joe Sakic 94
Which of the following statements will display the player's
Names, points and
PIM for all players?
(Select the correct response)
A. SELECT points.name, points.points, pim.name, pim.pim
FROM points INNER JOI
N pim ON points.name=pim.name
B. SELECT points.name, points.points, pim.name, pim.pim
FROM points FULL OUTE
R JOIN pim ON points.name=pim.name
C. SELECT points.name, points.points, pim.name, pim.pim
FROM points LEFT OUTE
R JOIN pim ON points.name=pim.name
D. SELECT points.name, points.points, pim.name, pim.pim
FROM points RIGHT OUT
ER JOIN pim ON points.name=pim.name
Table2
col1 INT
col2 CHAR(30)
Which of the following statements will insert all the rows in
TABLE2 into TAB
LE1?
(Select the correct response)
A. INSERT INTO table1 SELECT col1, col2 FROM table2
B. INSERT INTO table1 AS SELECT col1, col2 FROM table2
C. INSERT INTO table1 VALUES (table2.col1, table2.col2)
D. INSERT INTO table1 VALUES (SELECT col1, col2 FROM
table2)
E. INSERT INTO table1 (col1,col2) VALUES (SELECT
col1,col2 FROM table2)
47. Given table EMPLOYEE with columns EMPNO and SALARY and
table JOB with col
umns ID and TITLE, what is the effect of the statement:
UPDATE employee SET salary = salary * 1.15
WHERE salary < 15000 OR
EXISTS (SELECT 1 FROM job WHERE job.id = employee.empno
AND job.title = 'Mgr'
)
(Select the correct response)
A. Only managers that make less than 15,000 are given
salary increases.
B. Only non-managers that make less than 15,000 are given
salaray increases.
C. Employees that make less than 15,000 but no managers
are given salary incr
eases.
D. Employees that make less than 15,000 and all managers
are given salary inc
reases.
48. Which one of the following SQL statements sets the default
qualifier to "
user1"?
(Select the correct response)
A. SET CURRENT ID = 'user1'
B. SET CURRENT USER = 'user1'
C. SET CURRENT SQLID = 'user1'
D. SET CURRENT QUALIFIER = 'user1'
(4/55) Which of the following DB2 CLP options specify the file
that contains
The doubtful to be executed?
(Select the correct response)
A. -f
B. -b
C. -0
D. -w
(5/55) Which of the following delete rules create table will delete
on a dep
Endent table row if the parent table row is deleted?
(Select the correct response)
A. On delete sun
B. On delete Cascade
C. On delete restrict
D. On delete set null
E. On delete propagate
Pgm2
INSERT INTO mytab VALUES (...)
ROLLBACK
INSERT INTO mytab VALUES (...)
COMMIT
How many records will be successfully inserted and retained in
the table myta
b?
(Select the correct response)
A. 1
B. 2
C. 3
D. 4
(13/55) Which of the following types of DB2 locks allows for the
most concur
Rency within a table?
(Select the correct response)
A. A row lock
B. A page users
C. A field users
D. A column lock
Staff
ID LastName
1 Jones
2 Smiths
The statement :
Select * from staff, country
Will return how many rows?
(Select the correct response)
A. 2
B. 4
C. 5
D. 7
E. 10
POINTS
Names Points
Wayne Gretzky 244
Jaromir Jagr 168
Bobby Orr 129
Bobby Hull 93
Brett Hull 121
Mario Lemieux 189
Joe Sakic 94
STAFF
Id INTEGER
Name CHAR(30)
Dept INTEGER
Job CHAR(20)
Years INTEGER
Salary DECIMAL(10,2)
Comm DECIMAL(10,2)
Which of the following statements will display each department,
by name, and
the total salary of all employees in the department?
(Select the correct response)
A. SELECT a.deptname, SUM(b.salary) FROM org a, staff b
WHERE a.deptnumb=b.de
pt ORDER BY a.deptname
B. SELECT b.deptname, SUM(a.salary) FROM org a, staff b
WHERE a.deptnumb=b.de
pt ORDER BY a.deptname
C. SELECT a.deptname, SUM(b.salary) FROM org a, staff b
WHERE a.deptnumb=b.de
pt GROUP BY a.deptname
D. SELECT b.deptname, SUM(a.salary) FROM org a, staff b
WHERE a.deptnumb=b.de
pt GROUP BY a.deptname
Pgm2
INSERT INTO mytab VALUES (...)
ROLLBACK
INSERT INTO mytab VALUES (...)
COMMIT
How many records will be successfully inserted and retained in
the table myta
b?
(Select the correct response)
A. 1
B. 2
C. 3
D. 4
EMPLOYEE
Empno INTEGER
Firstname CHAR(30)
Midinit CHAR
Lastname CHAR(30)
Workdept CHAR(3)
Which of the following statements will list the employee's
employee number, l
ast name, and department name ONLY for those employees who
have a department?
(Select the correct response)
A. SELECT e.empno, e.lastname, d.deptname FROM
employee e, department d WHERE
e.workdept = d.deptno
B. SELECT e.empno, e.lastname, d.deptname FROM
employee e LEFT OUTER JOIN dep
artment d ON e.workdept = d.deptno
C. SELECT e.empno, e.lastname, d.deptname FROM
employee e FULL OUTER JOIN dep
artment d ON e.workdept = d.deptno
D. SELECT e.empno, e.lastname, d.deptname FROM
employee e RIGHT OUTER JOIN de
partment d WHERE e.workdept = d.deptno
PIM
Name PIM
Mats Sundin 14
Jaromir Jagr 18
Bobby Orr 12
Mark Messier 32
Brett Hull 66
Mario Lemieux 23
Joe Sakic 94
Which of the following statements will display the player 's
Names, points and
PIM for all players?
(Select the correct response)
A. Select points.name, points.points, pim.name, pim.pim from
points inner Joi
N pim on points.name=pim.name
B. Select points.name, points.points, pim.name, pim.pim from
points full oute
R join pim on points.name=pim.name
C. Select points.name, points.points, pim.name, pim.pim from
points left oute
R join pim on points.name=pim.name
D. Select points.name, points.points, pim.name, pim.pim from
points right Link
ER join pim on points.name=pim.name
Employee
Empno Michael
Firstname Char (30)
Mr. Midinit
Lastname Char (30)
Workdept Char (3)
Which of the following statements will list the employee 's
employee number, l
Ast name, and meaning name only for those employees who
have a department?
A. Select e.empno, e.lastname, d.deptname from employee e,
meaning d where
E.workdept = d.deptno
B. Select e.empno, e.lastname, d.deptname from employee e left
outer join dep
Artment d = d.deptno on e.workdept
C. Select e.empno, e.lastname, d.deptname from employee e full
outer join dep
Artment d = d.deptno on e.workdept
D. Select e.empno, e.lastname, d.deptname from employee e
right outer join de
Where e.workdept partment d = d.deptno
25. Which of the following processing can occur for a unit of work
using an i
solation level of Cursor Stability and allows scanning through the
table more
than once within the unit of work?
(Select the correct response)
A. Access uncommitted changes made by other processes
B. Update uncommitted changes made by other processes
C. Have updated result set rows changed by other processes
from one scan to t
he next
D. Have accessed result set rows changed by other processes
from one scan to
the next
31. Which of the following DB2 CLP options specify the file that
contains the
statements to be executed?
(Select the correct response)
A. –f
B.-b
C.-o
D.-w
33. Given table T1 with 100 rows, which of the following queries
will retriev
e 10 rows from table T1?
(Select the correct response)
A. SELECT * FROM t1 MAXIMUM 10 ROWS
B. SELECT * FROM t1 READ 10 ROWS ONLY
C. SELECT * FROM t1 OPTIMIZE FOR 10 ROWS
D. SELECT * FROM t1 FETCH FIRST 10 ROWS ONLY
35. Which of the following isolation levels will lock only the rows
returned
in the result set?
A. Read Stability
B. Repeatable Read
C. Cursor Stability
D. Uncommitted Read
36. Using the Control Center Create Table dialog box, which of
the following
dialogs allows the table creation DDL to be viewed?
(Select the correct response
A. Copy
B. Show SQL
C. Show Related
D. Sample Contents
41. Given table EMPLOYEE with columns EMPNO and SALARY and
table JOB with col
umns ID and TITLE, what is the effect of the statement:
UPDATE employee SET salary = salary * 1.15
WHERE salary < 15000 OR
EXISTS (SELECT 1 FROM job WHERE job.id = employee.empno
AND job.title = 'Mgr'
)
(Select the correct response)
A. Only managers that make less than 15,000 are given
salary increases.
B. Only non-managers that make less than 15,000 are given
salaray increases.
C. Employees that make less than 15,000 but no managers
are given salary incr
eases.
D. Employees that make less than 15,000 and all managers
are given salary inc
reases.
Table2
col1 INT
col2 CHAR(30)
Which of the following statements will insert all the rows in
TABLE2 into TAB
LE1?
(Select the correct response)
A. INSERT INTO table1 SELECT col1, col2 FROM table2
B. INSERT INTO table1 AS SELECT col1, col2 FROM table2
C. INSERT INTO table1 VALUES (table2.col1, table2.col2)
D. INSERT INTO table1 VALUES (SELECT col1, col2 FROM
table2)
E. INSERT INTO table1 (col1,col2) VALUES (SELECT
col1,col2 FROM table2)
48. Which one of the following SQL statements sets the default
qualifier to "
user1"?
(Select the correct response)
A. SET CURRENT ID = 'user1'
B. SET CURRENT USER = 'user1'
C. SET CURRENT SQLID = 'user1'
D. SET CURRENT QUALIFIER = 'user1'
51. Which of the following processing can occur for a unit of work
using an i
solation level of Read Stability and scanning through the table
more than onc
e within the unit of work?
(Select the correct response)
A. Access uncommitted changes made by other processes
B. Update uncommitted changes made by other processes
C. Rows added to a result set by other processes from one scan
to the next
D. Rows changed in a result set by other processes from one
scan to the next
8. J. the table :
Country
ID name person cities
1 Argentina 1 10
2 Canada 2 20
3 Cuba 2 10
4 Germany 1 0
7 5 5 France
Which of the following clauses when added to the statement
Select cities, name from country
Returns rows sorted by name and then sorted by the number of
cities (cities)?
13. Which of the following DB2 CLP options specify the file that
contains the
Doubtful to be executed?
(Select the correct response)
A. -f
B. -b
C. -o
D. -w
14. Which of the following is the best way to restrict user access
to a subse
T of columns in a table?
(Select the correct response)
A. Only grant access to the columns within a table that a user is
allowed to
See.
B. Create a view that only includes the columns a user is allowed
to see. Gra
Ntw@had.gov.hk the user access to the view, not the base table.
PIM
Name PIM
Mats Sundin 14
Jaromir Jagr 18
Bobby Orr 12
Mark Messier 32
Brett Hull 66
Mario Lemieux 23
Joe Sakic 94
Which of the following statements will display the player 's
Names, points and
PIM for all players?
(Select the correct response)
A. Select points.name, points.points, pim.name, pim.pim from
points inner Joi
N pim on points.name=pim.name
B. Select points.name, points.points, pim.name, pim.pim from
points full oute
R join pim on points.name=pim.name
C. Select points.name, points.points, pim.name, pim.pim from
points left oute
R join pim on points.name=pim.name
D. Select points.name, points.points, pim.name, pim.pim from
points right Link
ER join pim on points.name=pim.name
21. Which of the following SQL statements can remove all rows
from a table na
Med COUNTRY?
(Select the correct response
A. Delete country
B. Delete from country
C. Delete * from country
D. Delete from country Souls
30.To set up a client that can access DB2 UDB through DB2
Connect Enterprise
Edition, which of the following is the minimum software client
that must be
installed?
(Select the correct response)
A. DB2 Runtime Client
B. DB2 Personal Edition
C. DB2 Administration Client
D. DB2 Application Developer's Client
31.Which of the following types of DB2 locks allows for the most
concurrency
within a table?
(Select the correct response)
A. A row lock
B. A page lock
C. A field lock
D. A column lock
32.Which of the following processing can occur for a unit of
work using an i
solation level of Read Stability and scanning through the table
more than onc
e within the unit of work?
(Select the correct response)
The answer :
CACEE BA (AB) DA BDDAC ACADC
AACDD BACAA AECBA BDDB (De)
Dbcea () ABBC Caage
PIM
Name PIM
Mats Sundin 14
Jaromir Jagr 18
Bobby Orr 12
Mark Messier 32
Brett Hull 66
Mario Lemieux 23
Joe Sakic 94
Which of the following statements will display the player 's
Names, points and
PIM for all players?
(Select the correct response)
A. Select points.name, points.points, pim.name, pim.pim from
points inner Ridruejo
I
N pim on points.name=pim.name
B. Select points.name, points.points, pim.name, pim.pim from
points full Link
E
R join pim on points.name=pim.name
C. Select points.name, points.points, pim.name, pim.pim from
left Link points
E
R join pim on points.name=pim.name
D. Select points.name, points.points, pim.name, pim.pim points
right from OU
T
ER join pim on points.name=pim.name
A 11 a 21
C 22 B 12
C 13 D 23
The following results are desired :
C1 C2 flight fees
-- -- -- --
A 11 a 21
C 13 C 22
-- -- D 23
Which of the following joins will yield the desired results?
(Select the correct response)
A. Select * from tab1, tab2 where c1=c0078
B. Select * from tab1 inner 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
Employee
Empno Michael
Firstname Char (30)
Mr. Midinit
Lastname Char (30)
Workdept Char (3)
Which of the following statements will list the employee 's
employee number, l
Ast name, and meaning name only for those employees who
have a department?
A. Select e.empno, e.lastname, d.deptname from employee e,
meaning d wher
E
E.workdept = d.deptno
B. Select e.empno, e.lastname, d.deptname from employee e left
outer join de
P
Artment d = d.deptno on e.workdept
C. Select e.empno, e.lastname, d.deptname from employee e full
outer join de
P
Artment d = d.deptno on e.workdept
D. Select e.empno, e.lastname, d.deptname from employee e
right outer join d
E
Where e.workdept partment d = d.deptno
COUNTRY
2 Canada 2 20
3 Cuba 2 10
4 Germany 1 0
5 France 7 5
A. ORDER BY 2,1
B. GROUP BY 2, 1
A. bind
B. rebind
C. update
D. rebuild
ment.
as primary keys.
25. Which of the following processing can occur for a unit of work
using an i
solation level of Cursor Stability and allows scanning through the
table more
than once within the unit of work?
A.0
B.1
ROLLBACK
A. COL1 COL2
----------- -----------
0 record(s) selected.
B. COL1 COL2
----------- -----------
1 2
1 record(s) selected.
----------- -----------
1 2
4 3
A. LOAD
B. ALTER
C. UPDATE
D. IMPORT
31. Which of the following DB2 CLP options specify the file that
contains the
statements to be executed?
A. –f
B.-b
C.-o
D.-w
Emp:
Empid Name
11 Joe Smith
23 Melanie Jones
30 Robert Bruce
49 Janice Baker
66 Mario Diaz
68 Maria Diaton
How many rows in the table will be locked after the statement is
run?
A.0
B.1
C.4
D.5
E.6
33. Given table T1 with 100 rows, which of the following queries
will retriev
e 10 rows from table T1?
A. ON DELETE REMOVE
B. ON DELETE CASCADE
C. ON DELETE RESTRICT
E. ON DELETE PROPAGATE
35. Which of the following isolation levels will lock only the rows
returned
in the result set?
A. Read Stability
B. Repeatable Read
C. Cursor Stability
D. Uncommitted Read
36. Using the Control Center Create Table dialog box, which of
the following
dialogs allows the table creation DDL to be viewed?
A. Copy
B. Show SQL
C. Show Related
D. Sample Contents
B. ROLLBACK
C. TERMINATE
D. SAVEPOINT
E. CONNECT RESET
Program 1:
COMMIT
Program 2:
COMMIT
ROLLBACK
ROLLBACK
COMMIT
A.0
B.1
C.2
D.3
E.4
Thread 1: COMMIT
Thread 1: ROLLBACK
A.0
B.1
C.2
D.3
A. Object
B. Network
C. Relational
D. Hierachical
E. Multi-dimensional
41. Given table EMPLOYEE with columns EMPNO and SALARY and
table JOB with col
umns ID and TITLE, what is the effect of the statement:
eases.
reases.
A. The client.