1z0-882 | Renew Oracle 1z0-882 exam


Q1. Inspect the SELECT query:

Mysql> EXPLAIN SELECT employees. Emp_no, first_name, last_name FROM employees JOIN title WHERE to_date > ‘2008-10-11’;

2 rows in set (0.00 sec)

Which action will optimize the query?

A. Add an index to the employees. emp _no column.

B. Add the keyword STRAIGHT_JOIN.

C. Add an index on the to_ date column.

D. Add the FORCE INDEX (PRIMARY) optimizer hint for the employees table.

Answer: C

Q2. Inspect the CREATE TABLE below:

Mysql> CREATE TABLE foo (a INT, PRIMARY KEY (a)) ENGINE =InnoDB;

Query Ok, 0 rows affected, 2 warnings (0.11 sec) Mysql> SHOW WARNINGS;

Which two is true connecting the meaning of the warnings?

A. The InnoDB storage engine was disabled during server startup.

B. Global variable skip _innodb was set to ON after the server had started.

C. The default storage engine MYISAM was used for the table created.

D. MYSQL server was not started with the option default –storage –engine=InnoDB

E. Needed to specify TYPE = InnoDB instead of ENGINE=InnoDB

Answer: D,E

Q3. You have a database ‘dev’ that contains 15 tables, all of which use the CHARACTER SET ‘utfs’ and the COLLATION ‘utfs_general_ci’.

You perform the command:

ALTER DATABASE ‘dev’ CHARACTER SET =’latin’ COLLATION=’latin1’_swedish_ci’ What is the result?

A. You get an error because database are not allowed to have CHARACTER SET or COLLATION attributes.

B. You get an error because the settings for CHARACTER SET and COLLATION attributes do not match the settings for the tables inside the database.

C. You get an error while trying to change from a more inclusive CHARACTER SET like ‘utfs to a less’ inclusive CHARACTER SET like ‘latin’.

D. You get an error because changes to the CHARACTER SET or COLLATION attribute can happen only for empty databases.

E. The statement succeeds and new tables created in this database use the new settings as their default values.

F. The statement succeeds and all of the tables inside the database are converted to user the new settings.

Answer: E

Q4. Consider the structure of the table countryLanguage and the distribution of the column Is official.

DESCRIBE CountryLanguage;

SELECT Isofficial, COUNT (Isofficial) FROM CountryLanguage GROUP BY Isofficial;

You add an index on the Isofficial column. Which two statement are true?

A. The optimizer will choose the index when Isofficial=’T’ is in the WHERE clause.

B. The optimizer will choose the index when Isofficial=’F’ is in the WHERE clause.

C. The optimizer will not choose the index on the Isofficial column.

D. The speed of INSERT statements to this table will be improved.

E. The speed of INSERT statements to this table will be reduced.

F. The speed of INSERT statements to this table will be unchanged.

Answer: C,E

Q5. Consider the my_table table with two integer columns, a and b, and the contents as shown; Mysql > SELECT a, b FROM my_table;

1 row in set result of this query? SELECT a—b

FROM my_table;

A. 0

B. 2

C. 4

D. An error message

Answer: A

Q6. The data from t1 table is:

Assuming You want to see this output:

Which query achieves the preceding result?

A. SELECT name FROM t1 WHERE name LIKE ,_e%

B. SELECT name FROM t1 WHERE name LIKE,e%.;

C. SELECT name FROM t1 GROUP BY name ORDER by name LIMIT 1,1;

D. SELECT name FROM t1 GROUP BY name HAVING sun ( marks)=176 ORDER BY name;

Answer: C

Q7. A table country exists with a column Name. A user variable @ limitcount contains the value 20.

Which two statements are valid uses of the LIMIT clause?

A. SELECT Name FROM country LIMIT 100-50

B. SELECT Name FROM country LIMIT 100,50

C. SELECT Name FROM country LIMIT 35

D. SELECT Name FROM country LIMIT @limitcount

E. SELECT Name FROM country LIMIT RAND ()

Answer: B,C

Q8. A statement exists that can duplicate the definition of the ‘world’table.

What is missing?

CREATE TABLE t1 world

A. FROM

B. USING

C. COPY

D. LIKE

Answer: D

Q9. Consider the table structure shown by this output: Mysql> desc city:

5 rows in set (0.00 sec) You execute this statement:

SELECT -,-, city. * FROM city LIMIT 1 What is returned?

A. An error message

B. One row with 5 columns

C. One row with 10 columns

D. One row with 15 columns

Answer: A

Q10. A table (t1) contains 1000 random integer values in the first column (col1). The random values range from 1 to 1000.

You execute this query:

SELECT col1 FROM t1 WHERE col1< 100 UNION

SELECT col1 FROM t1 WHERE col1 BETWEEN 100 and 200

UNION ALL

SELECT col1 FROM t1 WHERE col 1 >=900

What is the output?

A. A list of unique values within the ranges of 1-200 and 900-1000

B. A list of unique values within the range of 1-200 and a list of all values, including duplicates, on the table within the range of 900-1000

C. A list of all values , including duplicates, in the range of 1-200 and a list of unique values in the range of 900-1000

D. A list of all values, including duplicates, in the ranges of 1-200 and 900-1000

E. An error, because mixing UNION and UNION ALL in the same query is not permitted

Answer: C