Free Cheat-test Samples and Demo Questions Download
Adobe exams Adobe
Apple exams Apple
Avaya exams Avaya
Check Point exams Check Point
Cisco exams Cisco
Citrix exams Citrix
CIW exams CIW
CompTIA exams CompTIA
CWNP exams CWNP
EC-Council exams EC-Council
EMC exams EMC
Exin exams Exin
Fortinet exams Fortinet
GIAC exams GIAC
Hitachi exams Hitachi
HP exams HP
IBM exams IBM
Isaca exams Isaca
ISC exams ISC
ISEB exams ISEB
Juniper exams Juniper
LPI exams LPI
McAfee exams McAfee
Microsoft exams Microsoft
Oracle exams Oracle
PMI exams PMI
Riverbed exams Riverbed
SNIA exams SAP
Sun exams SAS
Symantec exams Symantec
VMware exams VMware
All certification exams

IBM 000-512 Exam - Cheat-Test.com

Free 000-512 Sample Questions:

1.Given a table T1, with a column C1 char(3), that contains strings in upper and lower case letters,
which of the following queries will find all rows where C1 is the string 'ABC' in any case?
A.SELECT * FROM t1 WHERE c1 = 'ABC' B.SELECT * FROM t1 WHERE UCASE(c1) = 'ABC'
C.SELECT * FROM t1 WHERE IGNORE_CASE(c1 = 'ABC')
D.SELECT * FROM t1 WHERE c1 = 'ABC' WITH OPTION CASE INSENSITIVE
Answer: B

2.Given the two following tables: Names Name Number Wayne Gretzky 99 Jaromir Jagr 68 Bobby Orr 4 Bobby Hull 23 Brett Hull 16 Mario Lemieux 66 Steve Yzerman 19 Claude Lemieux 19 Mark Messier 11 Mats Sundin 13 Points Name Points Wayne Gretzky 244 Jaromir Jagr 68 Bobby Orr 129
Bobby Hull 93 Brett Hull 121 Mario Lemieux 189 Joe Sakic 94 Which of the following statements will display the player Names, numbers and points for all players with an entry in both tables? Which of the following statements will display the player? Names, numbers and points for all players with an entry in both tables?
A.SELECT names.name, names.number, points.points FROM names INNER JOIN points 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
E.SELECT names.name, names.number, points.points FROM names FULL OUTER JOIN points ON
names.name=points.name
F.SELECT names.name, names.number, points.points FROM names LEFT OUTER JOIN points ON
names.name=points.name
G.SELECT names.name, names.number, points.points FROM names RIGHT OUTER JOIN points ON
names.name=points.name
H.SELECT names.name, names.number, points.points FROM names LEFT OUTER JOIN points ON
names.name=points.name
I.SELECT names.name, names.number, points.points FROM names RIGHT OUTER JOIN points ON
names.name=points.name
J.SELECT names.name, names.number, points.points FROM names LEFT OUTER JOIN points ON
names.name=points.name
K.SELECT names.name, names.number, points.points FROM names RIGHT OUTER JOIN points ON
names.name=points.name
Answer: A

3.Given the tables: 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 STAFF ID LASTNAME 1 Jones 2 Smith The statement: SELECT * FROM staff, country will return how many rows?
A.2
B.4
C.5
D.7
E.10
Answer: E

4.Given the following SQL statements: CREATE TABLE tab1 (col1 INT) CREATE TABLE tab2 (col1
INT) INSERT INTO tab1 VALUES (NULL),(1) INSERT INTO tab2 VALUES (NULL),(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.1
B.2
C.3
D.4
E.0
Answer: A

5.Which of the following describes why savepoints are NOT allowed inside an atomic unit of work?
A.Atomic units of work span multiple databases, but savepoints are limited to units of work which operate
on a single database.
B.A savepoint implies that a subset of the work may be allowed to succeed, while atomic operations must succeed or fail as a unit.
C.A savepoint requires an explicit commit to be released, and commit statements are not allowed in atomic operations such as compound SQL.
D.A savepoint cannot be created without an active connection to a database, but atomic operations can contain a CONNECT as a sub­statement.
Answer: B

6.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) The job column contains these job types: manager, clerk, and salesperson. Which of the following statements will return the data with all managers together, all clerks together and all salespeople together in the output?
A.SELECT * FROM staff ORDER BY job
B.SELECT job, name FROM staff GROUP BY name, job
C.SELECT * FROM staff GROUP BY name, job, id, dept, years, salary, comm
D.SELECT * FROM staff ORDER BY name, job, id, dept, years, salary, comm
Answer: A

7.Which of the following occurs if an application ends abnormally during an active unit of work?
A.Current unit of work is committed
B.Current unit of work is rolled back
C.Current unit of work remains active
D.Current unit of work moves to pending state
Answer: B

8.User2 has DBADM authority on database DB1. This allows the user to do which of the following?
A.Drop database DB1
B.Backup database DB1
C.Create tables in any database
D.Create tables in database DB1
Answer: D

9.Which of the following is the result of the following SQL statement: ALTER TABLE table1 ADD col2 INT WITH DEFAULT
A.The statement fails with a negative SQL code.
B.The statement fails because no default value is specified.
C.A new column called COL2 is added to TABLE1 and populated with zeros.
D.A new column called COL2 is added to TABLE1 and populated with nulls.
E.A new column called COL2, which cannot contain nulls, is added to TABLE1.
Answer: C

10.Given two embedded SQL program executions with the following actions: Pgm1 INSERT INTO mytab VALUES (...) COMMIT INSERT INTO mytab VALUES (...) ROLLBACK Pgm2 INSERT INTO mytab VALUES (...) ROLLBACK INSERT INTO mytab VALUES (...) COMMIT How many records will be successfully inserted and retained in the table mytab?
A.1
B.2
C.3
D.4
Answer: B

11.Given the following DDL statement: CREATE TABLE newtab1 LIKE tab1 Which of the following would occur as a result of the statement execution?
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
Answer: D

12.Given the table COUNTRY 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 FETCH c1 Which of the following is the last name obtained from the table?
A.Cuba
B.France
C.Canada
D.Germany
E.Argentina
Answer: C

13.Given an embedded SQL program with a single connection, two threads and the following actions: Thread 1: INSERT INTO mytab VALUES (...) Thread 2: INSERT INTO mytab VALUES (...) Thread 1: ROLLBACK Thread 2: INSERT INTO mytab VALUES (...) Thread 1: COMMIT How many records will be successfully inserted into the table mytab?
A.0
B.1
C.2
D.3
Answer: B

14.Given the table T1 created by: CREATE TABLE t1 ( id INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY, c1 CHAR(10) NOT NULL, c2 CHAR(10) ) Which of the following INSERT statements will succeed?
A.INSERT INTO t1 VALUES (1, 'abc', NULL)
B.INSERT INTO t1 VALUES (1, NULL, 'def')
C.INSERT INTO t1 (c1, c2) VALUES ('abc', NULL)
D.INSERT INTO t1 (c1, c2) VALUES (NULL, 'def')
Answer: C

15.Which of the following SQL statements can remove all rows from a table named COUNTRY?
A.DELETE country
B.DELETE FROM country
C.DELETE * FROM country
D.DELETE ALL FROM country
Answer: B

16.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 B 12 ­ ­ C 13 C 22 Which of the following joins will yield the desired results?
A.SELECT * FROM tab1, tab2 WHERE c1=cx
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 LEFT OUTER JOIN tab2 ON c1=cx
Answer: D

17.Which of the following tasks can be performed using the ALTER TABLESPACE statement?
A.Assign a bufferpool.
B.Change the table space name.
C.Change the type of the table space.
D.Change the page size of the table space.
Answer: A

18.Which of the following can be accomplished with a single UPDATE statement?
A.Updating multiple tables
B.Updating a view consisting of joined tables
C.Updating multiple tables based on a WHERE clause
D.Updating a table based on a sub­select using joined tables
Answer: D

19.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 SQL statements will return the total number of employees in each department and the corresponding department id under the following conditions: 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
Answer: A

20.Given the following: A table containing a list of all seats on an airplane. A seat consists of a seat number and whether or not it is assigned. An airline agent lists all the unassigned seats on the plane. When the agent refreshes the list from the table, the list should not change. Which of the following isolation levels should be used for this application?
A.Read stability
B.Repeatable read
C.Cursor stability
D.Uncommitted read
Answer: B

21.Which of the following types of DB2 locks allows for the most concurrency within a table?
A.A row lock
B.A page lock
C.A field lock
D.A column lock
Answer: A

22.Which of the following utilities can examine a table and its indexes and update the system catalogs with the table's statistical information?
A.runstats
B.getstats
C.check index
D.chkstats
Answer: A

23.Which of the following DB2 components allows the analysis of multidimensional databases?
A.DB2 Runtime Client
B.DB2 Control Center
C.DB2 OLAP Starter Kit
D.DB2 Spatial Extender
E.DB2 Performance Monitor
Answer: C

24.Which of the following tools allows the DBA to set limits, and be alerted if these limits are exceeded?
A.DB2 Index Wizard
B.DB2 Script Center
C.DB2 Command Center
D.DB2 Performance Monitor
Answer: D

25.Which of the following tools can be used to identify inefficient SQL statements without executing the query?
A.QMF
B.Script Center
C.Visual Explain
D.Performance Monitor
Answer: C

26.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?
A.DB2 Runtime Client
B.DB2 Personal Edition
C.DB2 Administration Client
D.DB2 Application Developer Client DB2 Application Developer? Client
Answer: A

27.If a DB2 Warehouse Manager toolkit is selected during the installation of DB2 UDB Version 7.1, which of the following databases must be defined?
A.None
B.Target Database
C.Source Database
D.Control Database
Answer: D

28.Which of the following DB2 UDB isolation levels will NOT lock any rows during read processing?
A.Read Stability
B.Repeatable Read
C.Uncommited Read
D.Cursor Stability
Answer: C


© 2014 Cheat-Test.com, All Rights Reserved