1、to set up a client that can access db2 udb through db2 connect enterprise edition. Which of is the minimum softwoare client aht must be installed
A.db2 runtime client
Bdb2 personal edition
Cdb2 administration client
Ddb2 application developers cleint
2、.with dbadm authority on the database and given the statements:
create table t1 (c1 char(1))
insert into t1 values(‘b’)
create view v1 as select c1 from t1 where c1=’a’ with check option
insert into v1 values(‘a’)
insert into v1 values(‘b’)
how many rows would be returned from the statement SELECT c1 FROM t1?
A.0
B.1
C.2
D.3
3 .given table t1 with100 rows,which of the following queries will retrive10 rows form table t1
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
4 given the statemnt
create table t1
(
c1 char(3)
constraint c1
check(c1 in (‘a01’,’b01’,’c01’))
)
db2 verifies that the etable check constraints is met during which of the fowlignacitons
a.
adding data using load
b.
the reorg of the table
c.
the insert of each row in t1
d.
the creattion of the index fro the tagle
还有另外一种选项
A. Reorganizing the table.
B. Updating any row in the table.
C. Adding an insert trigger to the table.
D. Creating a unique index for the table.
5 given the foliwng scenario ,an application used a 15 digit value to uniquely identigfycustome
transactions, this number is also sued for arithmitic operations ,which of the foliwngis the most effiecitn db2 data tyiope for the column defineitno for this purpose
a char
b.clob
cinteger
dnumeric(15,2)
e.
decimal(15,0)
6 .given the tables
tablea
tableb
empid
name
empid
weeknumber
PAYCHECH
1
joe
1
1
1000.00
2
BOB
1
2
1000.00
table was defined as follows
create table tableb (emped char(3),weeknumber char(3),paycheck decimal(6.2)
constraint const1 foreign 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='2'?
A.0
B.1
C.2
D.3
7which of the following is not a valid data type on create table?
A.clob
B.double
C.numeric
D.datetime
8given the following table definition
staff
id
integer
name
char(20)
dept
integer
job
char(20)
years
integer
salary
decimal(10.2)
comm
decimal(10.2)
which of the following sql statements will return the rotal number of employees in each department and the corresponding department id under the following cnditions
only return departments with at least one employee receiving a commission greater than 5000 the result should be sorted by the department count from most to least
A.
select dept.count(id )from staff where comm>5000 group by dept order by 2 desc
B.
select dept.count.(*)from staff group by dept having comm>5000 order by 2 desc
C. select dept.count(*) from staff where comm>5000 group by dept.comm order
by 2 desc
D.
select dept.comm.count(id )from staff where comm>5000 group by dept.comm order by 3 desc
9given the table contry and the statements below
country
id
name
person_id
cities
1
argentina
1
10
2
canada
2
20
3
cuba
2
10
4
germany
1
0
5
france
7
5
declare c1 cursor with hold for select *from country order by person_id name
open c1
fetch c1
commit.0
fetch c1
which of the following is the last name obtained form the tabe?
A.
cuba
B.
france
C.
canada
D.
germany
E.
argentina
10.Which two of the following SQL data types should be used to store a small binary image?
(Select 2)
A. CLOB
B. BLOB
C. VARCHAR
D. GRAPHIC
E. VARCHAR FOR BIT DATA
|