Labour Day Special - 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: c4sdisc65

Note! 1z0-882 has been withdrawn.

1z0-882 Practice Exam Questions with Answers Oracle Certified Professional - MySQL 5.6 Developer Certification

Question # 6

The people table contains the data as shown:

1z0-882 question answer

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

Full Access
Question # 7

Which three view types are not updateable?

A.

A view created with the TEMPTABLE algorithm

B.

A view containing a GROUP BY clause

C.

A view containing a WHERE clause

D.

A view containing a HAVING clause

E.

A view that contains a literal column

Full Access
Question # 8

Which three database objects have non-case-sensitive names on all operating system?

A.

Table

B.

Column

C.

Index

D.

Stored procedure

E.

Trigger

Full Access
Question # 9

Consider the table structure shown by this output:

Mysql> desc city:

1z0-882 question answer

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

Full Access
Question # 10

Consider the table t1 created with this statement:

CREATE TABLE t1(

id INT NOT NULL AUTO_INCREMENT

PRIMARY KEY,

Name CHAR (20)

ENGINE=InnoDB;

After inserting three rows, the table contains:

1z0-882 question answer

These commands are executed:

DELETE FROM t1 WHERE id=200;

INSERT INTO t1 (name) VALUES (‘pluto’):

Which data set is inserted in the table?

A.

(200.pluto)

B.

(101,Pluto)

C.

(201,Pluto)

D.

(300,Pluto)

Full Access
Question # 11

Using the query:

SELECT Code FROM country WHERE Name = ‘united states’

Which statement executed in the mysql client would create a prepared statement?

A.

PREPARE STATEMENT countrycode FROM ‘SELECT code FROM counyry WHERE Name =?.;

B.

PREPARE countrycode As ‘SELECT code FROM country WHERE Name =?.;

C.

PREPARE countrycode FROM ‘SELECT code FROM country WHERE Name =?.;

D.

PREPARE STATEMENT countrycode As ‘SELECT code FROM country WHERE Name =?.;

Full Access
Question # 12

You wish to create a trigger on the ‘city’ table that will check the value of the ‘District’ field before any INSERT. The trigger needs to change it to” Unknown” for an empty string or NULL.

CREATE TRIGGER City_bi

BEFORE INSERT ON CITY

FOR EACH ROW

BEGIN

IF OLD. District IS NULL OR OLD.District= . .

THEN

SET NEW.District=’Unknown’;

END IF :

END;

Does the CREATE TRIGGER statement accomplish this goal?

A.

Yes; the trigger works correctly.

B.

No; FOR EACH ROW is invalid syntax.

C.

No; the syntax should be CREATE TRIGGER city-bi ON city BEFORE INSERT….

D.

No; the OLD keyword cannot be used in an INSERT trigger.

Full Access
Question # 13

Examine this table that contains over two million rows of data:

CREATE TABLE ‘news_feed’ (

.id’bigint (20) NOT NULL AUTO _INCREMENT,

.news _sources_id’varchar (11) NOT NULL,

.dataline’ datetime NOT NULL,

.headline’ varchar (256) NOT NULL,

.story’ text NOT NULL,.tag varchar (32768) DEFAULT NULL,

PRIMARY KEY (‘id’)

KEY ‘dateline’ ( ‘dateline’)

)

Examine this query that returns 332 rows of date:

SELECT *

FROM news_feed

WHERE DATE(dateline)= ‘2013-01-01’

Which change would show the greatest improvement in the response time of the query?

A.

Use the LIKE operator:

SELECT . . .WHERE dateline LIKE ‘2013-10-01&’

B.

USE the DATEDIFF function:

SELECT . . . WHERE DATEDIFF (dateline, ‘2013-01-01’) = 0

C.

Use numeric equivalents for comparing the two dates:

SELECT. . .WHERE MOD(UNIX_TIMESTAMP (dateline), 86400 =UNIX_TIMESTAMP (‘2013-01-01’)

D.

Use a date range comparison:

SELECT . . . WHERE dateline >= ‘2013-01’ and dateline < ‘2013-01-02’

Full Access
Question # 14

Consider the structures of the country and countrylanguage tables.

mysql >DESCRIBE country;

1z0-882 question answer

mysql> DESCRIBE countrylanguage;

1z0-882 question answer

Which query will give you the list of all European countries where German is spoken?

A.

SELECT Code AS c, Name

FROM Country

WHERE Continent = ‘Europe’

AND EXISTS (

SELECT *

FROM CountryLanguage

WHERE CountryCode = Code

And Language= ‘German’

)

B.

SELECT Code AS c, Name

FROM Country

WHERE Continent = ‘Europe’

AND Name IN (

SELECT *

FROM CountryLanguage

WHERE CountryCode = Code

AND Language =’German’

)

C.

SELECT Code AS c, Name

FROM Country

WHERE Continent = ‘ Europe’

AND EXIST ANY (

SELECT Language, CountryCode

FROM CountryLanguage

WHERE CountryCode =Code

AND Language = ‘German’

)

D.

SELECT Code AS c, Name

FROM Country

WHERE Continent = ‘Europe’

AND (

SELECT *

FROM CountryLanguage

WHERE CountryCode =Code

AND Language =’German’

)

Full Access
Question # 15

Which two Functions can be used in a C program to retrieve information about warning?

A.

mysql_info

B.

mysql_error

C.

mysql_warning_count

D.

mysql_errno

Full Access