⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 db2认证测试题.txt

📁 db2 指定某个字符串中的第几个字符的更新
💻 TXT
📖 第 1 页 / 共 2 页
字号:
 会员:  密码:
是否自动登录       注册用户 | 忘记密码   高级搜索 
 CU爱心榜    CU-IT人才库  
DB2认证测试题,免费给大家,答案准确率9成,请置顶 

    
 
       ChinaUnix.net首页 -> 论坛首页 -> DB2 [CU精华区]    
 
阅读上一个主题 :: 阅读下一个主题   
作者 留言 
iihero      




级别: 侠客
注册时间: 2003-12-13
最后登录: 2003-12-21
帖子总数: 22
精华帖子: 0
原创精华: 0
来自: 北京
在线状态: ...离线...
 发表于: 2003-12-21 15:12    发表主题: DB2认证测试题,免费给大家,答案准确率9成,请置顶    

--------------------------------------------------------------------------------
 
答案: 
CACEE BA(AB )DA BDDAC ACADC 
AACDD BACAA AECBA BDDB(DE) 
DBCEA ( )ABBC CAAGE 

1. 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? 
(Select the correct response) 
A.0 
B.1 
C.2 
D.3 

2. Which of the following statements will create an index and prevent table T 
1 from containing two or more rows with the same values for column C1? 
(Select the correct response) 
A. CREATE UNIQUE INDEX ix4 ON t1 (c1) 
B. CREATE DISTINCT INDEX ix1 ON t1 (c1) 
C. CREATE UNIQUE INDEX ix6 ON t1 (c1,c2) 
D. CREATE DISTINCT INDEX ix3 ON t1 (c1,c2) 

3. A user has a numeric data column with a maximum value of 100,000. Which of 
the following data types will use the minimum amount of storage for the colu 
mn? 
(Select the correct response) 
A. IDENTITY 
B. BIGINT 
C. INTEGER 
D. SMALLINT 

4. Given the table T1, created by: 
CREATE TABLE t1 
( 
id INTEGER GENERATED BY DEFAULT AS IDENTITY, 
c1 CHAR(3) 
) 
The following SQL statements are issued: 
INSERT INTO t1 VALUES (1, 'ABC') 
INSERT INTO t1 VALUES (5, 'DEF') 
Which of the following values are inserted into the ID column by the followin 
g statement? 
INSERT INTO t1(c1) VALUES ('XYZ') 
(Select the correct response) 
A.0 
B.1 
C.2 
D.5 
E.6 

5. Which of the following is the implicit qualifier for a declared temporary 
table? 
(Select the correct response) 
A. The schema name SYSCAT. 
B. The schema name SESSION. 
C. The schema name TEMPUSER. 
D. The userid specified with the BIND command. 
E. The userid who established the connection to the database and declared the 
temporary table. 

6. 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. Gra 
nt 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. 

7. Which of the following is the result of a successful ROLLBACK statement? 
(Select the correct response) 
A. Held locks are released 
B. Release-pending conditions are undone 
C. Tables in LOAD PENDING are released 
D. Constraint checking conditions are undone 
E. Existing database connections are released 

8. Which two of the following modes can be used on the lock table statement? 

(Select all that apply) 
A. SHARE MODE 
B. EXCLUSIVE MODE 
C. REPEATABLE READ MODE 
D. UNCOMMITTED READ MODE 
E. INTENT EXCLUSIVE MODE 

9. Which of the following must be set up to allow the Control Center to view 
database objects? 
(Select the correct response) 
A. ODBC 
B. JAVA 
C. DB2 Administration Server 
D. Client Configuration Assistant 

10. Which of the following tools maintains a history of all executed statemen 
ts/commands for the current session within the tool? 
(Select the correct response) 
A. Journal 
B. SQL Assist 
C. DB2 Alert Center 
D. DB2 Command Center 

11. 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 JO 
I 
N pim ON points.name=pim.name 
B. SELECT points.name, points.points, pim.name, pim.pim FROM points FULL OUT 
E 
R JOIN pim ON points.name=pim.name 
C. SELECT points.name, points.points, pim.name, pim.pim FROM points LEFT OUT 
E 
R JOIN pim ON points.name=pim.name 
D. SELECT points.name, points.points, pim.name, pim.pim FROM points RIGHT OU 
T 
ER JOIN pim ON points.name=pim.name 

12. Given the following: 
TAB1 TAB2 
C1 C2 CX CY 
--- --- --- --- 
A 11 A 21 
B 12 C 22 
C 13 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 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 

13. Given two embedded SQL programs and the following actions: 
Pgm1 Pgm2 
INSERT INTO mytab VALUES (...) DELETE FROM mytab 
COMMIT ROLLBACK 
DELETE FROM mytab INSERT INTO mytab VALUES (...) 
ROLLBACK COMMIT 
If there exists one (1) row in table mytab before the programs are executed c 
oncurrently, 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 

14 Which of the following DB2 data types is used to store 50 MB of binary dat 
a as a single value? 
(Select the correct response) 
A. BLOB 
B. CLOB 
C. DBCLOB 
D. FOR BIT DATA 
E. VARCHAR FOR BIT DATA 

15. Given 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 statements will return all of the records ordered by j 
ob with the salaries in descending order? 
(Select the correct response 
A. SELECT * FROM staff ORDER BY salary DESC, job 
B. SELECT * FROM staff GROUP BY salary DESC, job 
C. SELECT * FROM staff ORDER BY job, salary DESC 
D. SELECT * FROM staff GROUP BY job, salary DESC 

16. Given the following table definitions 
DEPARTMENT 
Deptno CHAR(3) 
Deptname CHAR(30) 
Mgrno INTEGER 
Admrdept CHAR(3) 

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? 
A. SELECT e.empno, e.lastname, d.deptname FROM employee e, department 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 ON e.workdept = d.deptno 
C. SELECT e.empno, e.lastname, d.deptname FROM employee e FULL OUTER JOIN de 
p 
artment d ON e.workdept = d.deptno 
D. SELECT e.empno, e.lastname, d.deptname FROM employee e RIGHT OUTER JOIN d 
e 
partment d WHERE e.workdept = d.deptno 

17. Given the statement: 
CREATE TABLE t1 (c1 CHAR(1)) 
Data has been inserted into the table with rows of a,b,c,d,e,f. Given the fol 
lowing command is issued: 
ALTER TABLE t1 ADD CONSTRAINT con1 CHECK (c1 ='a') 
Which of the following occurs? 
(Select the correct response) 
A. Rows with c1 values of b,c,d,e,f are deleted 
B. Rows with c1 values of b,c,d,e,f have c1 set to NULL 
C. The ALTER command will fail as rows violate the constraint 
D. The ALTER command will move the violating rows to the exception table 

18. Given the following table structure: 
table1 
emp_num INT NOT NULL PRIMARY KEY 
emp_fname CHAR(30) NOT NULL 
emp_lname CHAR(30) NOT NULL 
emp_addr CHAR(60) NOT NULL 
emp_pin CHAR(10) NOT NULL 
Which of the following columns can be referenced by a foreign key clause from 
another table? 
(Select the correct response) 
A. emp_num 
B. emp_pin 
C. emp_addr 
D. emp_fname 
E. emp_lname 

19. Which of the following products can be used to perform a dictionary-based 
search? 
(Select the correct response) 
A. Net.Data 
B. XML Extender 
C. AVI Extender 
D. Text Extender 

20. Which of the following DB2 components can limit the resource consumption 
of queries? 
(Select the correct response) 
A. DB2 Connect 
B. DB2 Query Patroller 
C. DB2 Performance Monitor 
D. DB2 Net Search Extender 

21. Given the table: 
COUNTRY 
ID NAME PERSON CITIES 
1 Argentina 1 10 
2 Canada 2 20 
3 Cuba 2 10 
4 Germany 1 0 
5 France 7 5 
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)? 

(Select the correct response) 
A. ORDER BY 2,1 
B. GROUP BY 2, 1 
C. ORDER BY cities, name 
D. GROUP BY cities, name 

22. Which of the following will rebuild a package in the database from the ex 
isting catalog information? 
(Select the correct response) 
A. bind 
B. rebind 
C. update 
D. rebuild 

23. Given the following column requirements: 
Col1 Numeric Identifier - From 1 to 1000000 
Col2 Job Code - Variable, 1 to 2 characters long 
Col3 Job Description - Variable, 1 to 100 characters long 
Col4 Job Length - Length of Job in seconds 
Which of the following will minimize the disk space allocated to store the re 
cords if Job Description has an average length of 45? 
(Select the correct response) 
A. CREATE TABLE tab1 (col1 INT, col2 CHAR(2), col3 CHAR(100), col4 INT) 
B. B. CREATE TABLE tab1 (col1 INT, col2 VARCHAR(2), col3 CHAR(100), col4 INT 
) 
C. CREATE TABLE tab1 (col1 INT, col2 CHAR(2), col3 VARCHAR(100), col4 INT) 
D. CREATE TABLE tab1 (col1 INT, col2 VARCHAR(2), col3 VARCHAR(100), col4 INT 
) 

24. Given the following UPDATE statement: 
UPDATE address2 SET housenumber_buildingname= 
(SELECT buildingname FROM address1 
WHERE address2.id = address1.id) 
WHERE HOUSENUMBER_BUILDINGNAME IS NULL 
Which of the following describes the result of the statement? 
(Select the correct response) 
A. The statement will succeed. 
B. The statement will fail because a subquery cannot exist in an UPDATE stat 
e 
ment. 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -