小弟有几道题不明白!请各位指教!

[复制链接]
查看11 | 回复6 | 2005-10-30 22:39:00 | 显示全部楼层 |阅读模式
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
回复

使用道具 举报

千问 | 2005-10-30 22:39:00 | 显示全部楼层
小弟正在准备考DB2 700认证!这几道题一直弄不明白!希望高手帮忙做一下!!!谢谢!!
回复

使用道具 举报

千问 | 2005-10-30 22:39:00 | 显示全部楼层
12.Which of the following actions describes when SQL indexes can be explicitly referenced by name within an SQL statement?
A. When dropping the index.
B. When altering the index.
C. When selecting on the index.
D. When inserting using the index.
这道题也不会!
回复

使用道具 举报

千问 | 2005-10-30 22:39:00 | 显示全部楼层
22. Assuming the proper privileges, which two of the following would allow access to data in a table T1 using the name A1?
A.
CREATE ALIAS a1 FOR t1
B.
CREATE TABLE a1 LIKE t1
C.
CREATE INDEX a1 ON t1 (col1)
D.
CREATE VIEW a1 AS SELECT * FROM t1
E.
CREATE TRIGGER trig1 AFTER INSERT ON t1 FOR EACH ROW MODE DB2SQL INSERT INTO a1
回复

使用道具 举报

千问 | 2005-10-30 22:39:00 | 显示全部楼层
C 29.Given the following statements:
CREATE TABLE mytab
(
col1 INT NOT NULL PRIMARY KEY,
col2 CHAR(64),
col3 CHAR(32),
col4 INT NOT NULL,
CONSTRAINT c4 UNIQUE (col4,col1)
)
How many indexes are needed to support the table definition?
A.0B. 1C. 2 D. 3 E.4
回复

使用道具 举报

千问 | 2005-10-30 22:39:00 | 显示全部楼层
46.Given the following SQL statements:
CREATE TABLE tab1 (col1 INT)
INSERT INTO tab1 VALUES (NULL)
INSERT INTO tab1 VALUES (1)

CREATE TABLE tab2 (COL1 INT)
INSERT INTO tab2 VALUES (NULL)
INSERT INTO tab2 VALUES (1)

SELECT COUNT(*) FROM tab1
WHERE col1 IN
(SELECT col1 FROM tab2)
Which of the following is the result of the SELECT COUNT(*) statement?
A.0 B. 1C.2 D.NULL
回复

使用道具 举报

千问 | 2005-10-30 22:39:00 | 显示全部楼层
Given the following CREATE TABLE statement:
CREATE TABLE t1
(col1 INTEGER NOT NULL CONSTRAINT chk1 UNIQUE,
col2 DATE NOT NULL CHECK (col2 <= CURRENT_DATE),
col3 CHARACTER(128) NOT NULL WITH DEFAULT USER,
col4 VARCHAR (300) NOT NULL WITH DEFAULT )
The definition of which column caused the statement to fail?
A.
COL1 B. COL2 C.COL3 D.
COL4
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行