1z0-882 | A Review Of Free 1z0-882 practice test


Q21. Examine the structure and content of the MemberLocation table:

You want to have the field location returned in all letters (example: BERLIN). Which query would you use?

A. SELECT UPPER (Location) as location FROM MemberLocation

B. SELECT UPPER (BINARY location) as location FROM MemberLocation

C. SELECT UPPER (location AS UPPER ) as location FROM Memberlocation

D. SELECT CONVERT (Location AS UPPER ) as location FROM memberlocation

Answer: A

Explanation:

https://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_upper

Q22. Consider the content of the class and student tables: Class

Which three queries produce the same result?

A. SELECT *

FROM class

INNER JOIN student

ON class.class_id=student.class_id

B. SELECT *

FROM JOIN student LEFT JOIN student

ON class. Class.class_id=student.class_id

C. SELECT *

FROM class

INNER JOIN student

WHERE NOT ISNULL (student.class_id)

D. SELECT *

FROM JOIN student

On class .class_id=student.class_id WHERE NOT ISNULL (student.class_id)

E. SELECT *

FROM student RIGHT JOIN class

ON class.class_id=student.class_id

Answer: D

Q23. Your MYSQL server was successfully running for a days, and then suddenly stopped .You are sure that no mysqld process is running.

Which two may provide diagnostic information to help determine why the MYSQL server stopped?

A. The general query log file

B. The syslog on Linux/UNIX or the Event view on windows

C. The slow query log file

D. The MYSQL server error log file

E. The binary log file

Answer: D,E

Q24. You attempt to create two new tables: CREATE TABLE ‘warehouse’ (

‘id’ int (11) NOT NULL AUTO_INCREMENT,

‘name’ varchar (20) NOT NULL, ‘phone’ varchar (20) NOT NULL,

PRIMARY KEY (‘ id)

) ENGINE=MyISAM

CREATE TABLE ‘warehouseitem’ ( ‘warehouse_id’ bigint (11) NOT NULL, ‘item_id’ int (11) NOT NULL,

‘count’ int(11) NOT NULL DEFAULT ‘0’,

KEY “warehouse_id’ (‘warehouse-id) ,

FOREIGN KEY (warehouse_id) REFFERENCES warehouse (id)

) ENGINE= InnoDB

You get this error :

ERROR 1215 ( HYooo): cannot add foreign key constraint

Which two changes are required to permit these statements to execute without any error?

A. The ‘warehouseitem’ table must be managed by the MySAm storage engine.

B. The ‘warehouse-table must be managed by the InnoDB storage engine.

C. The foreign key clause must be reversed: FOREIGN KEY warehouse(1)REFERENCES (warehouse-id).

D. The data types of the ‘warehouse’.’id’ and ‘ warehouseitem.warehouse_is columns must match.

E. The warehouse_id’ column must be renamed ‘id’ to match the definition on the ‘warehouse’ table.

F. A UNIQUE key must be defined for the columns (‘item_id’,’warehouse_id’).

Answer: C,D

Q25. Which three are valid identifiers for the user table in the mysq1 database?

A. myssq1. user

B. ‘mysq1. user’

C. ‘mysq1’. ‘user’

D. Mysq1. ‘user’

E. ‘’mysq1. User’’

Answer: A,C,D

Q26. Assume the user has just connected to the MySQL server.

What is the result of the query SELECT @ a?

A. An error that @ a is undefined

B. A single NULL

C. An empty string

D. The value of GLOBAL variable @ a

Answer: B

Q27. The people table contains the data as shown:

Which two statements return two rows each?

A. SELECT DISTINCT last_name, first_name FROM people

B. SELECT 1,2 FROM people GROUP BY last_name

C. SELECT first_name, last _name FROM people WHERE age LIKE ‘2’

D. SELECT 1, 2 FROM people WHERE last _name =’smith’

E. SELECT first _name, last_name FROM people LIMIT 1, 2

Answer: C,E

Q28. A MySQL command- line client is started with safe updates disabled. Mysql - -safe – updates=0

What happens when you execute an UPDATE statement without a WHERE clause?

A. Results in an error

B. Updates every row in the specified table(s)

C. Results in - -safe-updates being enabled automatically

D. Causes a syntax error

Answer: A

Explanation: Reference:http://justalittlebrain.wordpress.com/2010/09/15/you-are-using-safe-update-mode-and-you-tried-to-update-a-table-without-a-where-that-uses-a-key-column/