Weekend Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 70percent

Oracle 1z0-882 Oracle Certified Professional, MySQL 5.6 Developer Exam Practice Test

Demo: 15 questions
Total 100 questions

Oracle Certified Professional, MySQL 5.6 Developer Questions and Answers

Question 1

Cormcctor/Net supports a decoupled database connection mode, where a database Connection is established only when needed.

'

Choose the three parts that are involved when working with decoupled data.

Options:

A.

OpenConnect.MySql, DataTTiread.MySql, CommandExecutor.MySql

B.

MySqlQueryBuIld, MySqlQuerytxer. MySq I Query Results

C.

DecoupODBCConn, DecoupMyScjlruiiimanrt, DecoupMySqlRetum

D.

DataSet, MySqlDataAdapter, MySql Command Builder

Question 2

Assume your connection uses SQL mode ANSI_QUOTES.

Which two statements cause a syntax error?

Options:

A.

CREATE TABLE FRIENDS (NAME CHAR (10))

B.

CREATE TABLE BINARY (PRIMARY SMALLINT)

C.

CREATE TABLE ‘TABLE’ (COLUMN’ INTEGER)

D.

CREATE TABLE “CONDITION” (“DESCRIBE” TEXT)

E.

CREATE TABLE INTERVAL (ELAPSED_TIME TIME)

Question 3

As a developer, you inherit this table as part of a project:

CREATE TABLE exam (

Exam_id INTEGER UNSIGNED NOT NULL PRIMARY KEY,

Examinee_id INTEGER UNSIGNED UNIQUE,

Score INTEGER UNSIGNED

)

What change should you make to ensure that examinee_id is an integer value throughout the table?

Options:

A.

The examinee_id column should be designated as PRIMARY KEY.

B.

A NOT NULL qualifier should be moved from exam-id to examinee-id.

C.

The PRIMARY KEY should be dropped and re-created as PRIMARY KEY (examinee-id, exam_id).

D.

A NOT NULL qualifier should be added to examinee_id.

Question 4

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?

Options:

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.

Question 5

Consider the structures of the country and countrylanguage tables.

mysql >DESCRIBE country;

mysql> DESCRIBE countrylanguage;

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

Options:

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’

)

Question 6

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;

Options:

A.

0

B.

2

C.

4

D.

An error message

Question 7

When executing a stored routine, how is the SQL_MODE determined?

Options:

A.

By the default SQL_MODE of the server

B.

By the current SQL _MODE of the session

C.

By the SQL_MODE that was set when the routine was defined

D.

By using TRADITTIONAL regardless of any other settings

Question 8

You want to compare all columns of table A to columns with matching names in table B. You want to select the rows where those have the same values on both tables.

Which query accomplishes this?

Options:

A.

SELECT * FROM tableA. tableB

B.

SELECT * FROM tableA JOIN tableB

C.

SELECT * FROM table A INNER JOIN tableB

D.

SELECT * FROM tableA NATURAL JOIN tableB

E.

SELECT & FROM tableA STRAIGHT JOIN tableB

Question 9

Given the table City:

SELECT Name

FROM City

WHERE CountryCode = ‘USA” OR WHERE CountryCode= ‘JPN’

What does this statement procedure?

Options:

A.

A single result set with one column that contains the names of cities from country codes USA and JPN.

B.

Two result sets each containing a single column with the names of cities from country codes USA and JPN.

C.

A single result set with two columns containing the names from country codes USA and JPN.

D.

No result set is returned and an error message is given.

Question 10

These there tables represent a many –to-many relationship in asocial networking database:

This query draft is constructed to report for the past 30 days:

Which change will correct this query?

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 11

Consider the CREATE FUNCTION statement:

CREATE FUNCTION countrycount ()

BEGIN

DECLARE count INT;

SELECT COUNT (*) INTO count FROM country;

RETURN count ;

END

What is the outcome when you try to create the function?

Options:

A.

An error results as the SELECT must assign the return values to a user variable.

B.

An error results as the count variable is not initialized with a value.

C.

An error result as the function must be defined with the CONTAINS SQL clause.

D.

An error result as the variable type returned by the function must be defined with a RETURNS clause.

Question 12

The city table has the following structure:

Consider the statement with an incorrect field name:

PREPARE countryBYID FROM ‘SELECT country FROM city WHERE ID=?,

What happens if a prepared statement named countryByID already exists when the above statement is executed?

Options:

A.

A duplicate name error will result because a prepared statement with the same name already exists.

B.

An unknown column error will result and the old prepared statement definition will remain in effect.

C.

An unknown column error will result and no prepared statement named countryByID will exist.

D.

A warning will result and the old prepared statement definition will remain in effect.

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?

Options:

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’

Question 14

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?

Options:

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.

Question 15

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?

Options:

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.

Demo: 15 questions
Total 100 questions