Алмат Мейржан
Quiz by , created more than 1 year ago

test

217
0
0
No tags specified
Алмат Мейржан
Created by Алмат Мейржан over 6 years ago
Close

data

Question 1 of 50

1

Which symbol do you use if you need to choose all the columns from the table to the result query?

Select one of the following:

  • *

  • +

  • All

  • %

Explanation

Question 2 of 50

1

Which is right order of the following clauses?

Select one of the following:

  • SELECT … FROM … GROUP BY … ORDER BY … WHERE

  • SELECT … WHERE … ORDER BY … GROUP BY

  • SELECT … FROM … WHERE … GROUP BY … ORDER BY

  • SELECT … FROM … WHERE … ORDER BY … GROUP BY

Explanation

Question 3 of 50

1

Which symbol is used to create a substitution variable?

Select one of the following:

  • *

  • &

  • _

  • %

Explanation

Question 4 of 50

1

Which keyword is used to provide an alias to a column?

Select one of the following:

  • COLUMN

  • ALIAS

  • IS

  • AS

Explanation

Question 5 of 50

1

Which command is used to view the structure of the table LOCATIONS?

Select one of the following:

  • DESCRIBE LOCATIONS

  • SELECT * FROM LOCATIONS

  • SHOW STRUCTURE LOCATIONS

  • PRINT LOCATIONS

Explanation

Question 6 of 50

1

Which of the following is a concatenation operator?

Select one of the following:

  • *

  • +

  • &

  • ||

Explanation

Question 7 of 50

1

Which keyword is used to eliminate duplicate rows in the result?

Select one of the following:

  • DESCRIBE

  • GROUP BY

  • HAVING

  • DISTINCT

Explanation

Question 8 of 50

1

Which of the following operations is an analogue to the CONCAT function?

Select one of the following:

  • ||

  • +

  • LIKE

  • IN

Explanation

Question 9 of 50

1

When using LIKE conditions which symbol is used to denote zero or many characters?

Select one of the following:

  • *

  • +

  • _

  • %

Explanation

Question 10 of 50

1

When using LIKE conditions which symbol is used to denote one character?

Select one of the following:

  • *

  • +

  • _

  • %

Explanation

Question 11 of 50

1

Which of the following clauses is used to limit the rows that are retrieved by the query?

Select one of the following:

  • WHERE

  • FROM

  • ORDER BY

  • GROUP BY

Explanation

Question 12 of 50

1

Which of the following clauses is used to sort the rows that are retrieved by the query?

Select one of the following:

  • WHERE

  • FROM

  • ORDER BY

  • GROUP BY

Explanation

Question 13 of 50

1

Which of the following functions extracts a string of determined length?

Select one of the following:

  • SUBSTR

  • INSTR

  • CONCAT

  • TRIM

Explanation

Question 14 of 50

1

Which of the following functions finds the numeric position of a named character?

Select one of the following:

  • SUBSTR

  • INSTR

  • CONCAT

  • TRIM

Explanation

Question 15 of 50

1

Which of the following functions joins two strings together?

Select one of the following:

  • CONCAT

  • TRIM

  • SUBSTR

  • INSTR

Explanation

Question 16 of 50

1

Which of the following functions is not single-row function?

Select one of the following:

  • SUM

  • UPPER

  • CONCAT

  • ROUND

Explanation

Question 17 of 50

1

Which of the following functions is not multiple-row function?

Select one of the following:

  • TRUNC

  • SUM

  • AVG

  • COUNT

Explanation

Question 18 of 50

1

FULL OUTER JOIN is used when

Select one of the following:

  • each row of one table must be join with each row of another table

  • each row of one table must be join with each row of another table even if the tables do not have any columns in common

  • the rows from both tables must be displayed even if they do not satisfy the JOIN condition

  • a Cartesian product of the two tables must be displayed

Explanation

Question 19 of 50

1

Queries that return only one row from the inner SELECT statement are called

Select one of the following:

  • Single-column subqueries

  • Multiple-column subqueries

  • Multiple-row subqueries

  • Single-row subqueries

Explanation

Question 20 of 50

1

Queries that return more than one row from the inner SELECT statement are called

Select one of the following:

  • Multiple-row subqueries

  • Single-row subqueries

  • Multiple-column subqueries

  • Single-column subqueries

Explanation

Question 21 of 50

1

The _______operator compares a value to each value returned by a subquery.

Select one of the following:

  • ANY

  • ALL

  • NOT

  • SOME

Explanation

Question 22 of 50

1

The ________operator compares a value to every value returned by a subquery.

Select one of the following:

  • ALL

  • ANY

  • NOT

  • SOME

Explanation

Question 23 of 50

1

Subqueries have the following characteristics:
I. Can pass one row of data to a main statement that contains a single-row operator, such as =, <>, >, >=, <, or <=
II. Can pass multiple rows of data to a main statement that contains a multiple-row operator, such as IN
III. Are processed first by the Oracle server, after which the WHERE or HAVING clause uses the results

Select one of the following:

  • I and III

  • I, II, and III

  • I and II

  • I only

Explanation

Question 24 of 50

1

A SELECT statement that is embedded in a clause of another SELECT statement is called

Select one of the following:

  • subquery

  • inner query

  • outer query

  • main query

Explanation

Question 25 of 50

1

You can place the subquery in a number of SQL clauses, including the following:
I. WHERE clause
II. HAVING clause
III. FROM clause

Select one of the following:

  • I and III

  • I, II and III

  • I and II

  • I only

Explanation

Question 26 of 50

1

Comparison conditions fall into two classes:

Select one of the following:

  • single-row operators (>, =, >=, <, <>, <=) and multiple-column operators (IN, ANY, ALL)

  • single-column operators (>, =, >=, <, <>, <=) and multiple-column operators (IN, ANY, ALL)

  • multiple-row operators (>, =, >=, <, <>, <=) and single-row operators (IN, ANY, ALL)

  • single-row operators (>, =, >=, <, <>, <=) and multiple-row operators (IN, ANY, ALL)

Explanation

Question 27 of 50

1

The subquery generally executes_________, and its output is used to complete the query condition for the main (or_________) query.

Select one of the following:

  • last, outer

  • first, inner

  • last, inner

  • first, outer

Explanation

Question 28 of 50

1

A subquery must be enclosed in_________________.

Select one of the following:

  • curly braces

  • double quotes

  • single quotes

  • parentheses

Explanation

Question 29 of 50

1

_________ clause can be used and is required in the subquery to perform Top-N analysis.

Select one of the following:

  • ORDER BY

  • HAVING

  • WHERE

  • GROUP BY

Explanation

Question 30 of 50

1

Which of the following operators is equivalent to the IN operator?

Select one of the following:

  • < ANY

  • = ALL

  • = ANY

  • > ANY

Explanation

Question 31 of 50

1

Queries containing set operators are called______________.

Select one of the following:

  • outer queries

  • compound queries

  • subqueries

  • inner queries

Explanation

Question 32 of 50

1

The _____________operator returns all rows that are selected by either query eliminating duplicates.

Select one of the following:

  • INTERSECT

  • UNION

  • MINUS

  • UNION ALL

Explanation

Question 33 of 50

1

Use the ________________operator to return all rows from multiple tables and eliminate any duplicate rows.

Select one of the following:

  • UNION ALL

  • UNION

  • MINUS

  • INTERSECT

Explanation

Question 34 of 50

1

_______________ returns all rows selected by either query, including all duplicates.

Select one of the following:

  • NTERSECT

  • MINUS

  • UNION

  • UNION ALL

Explanation

Question 35 of 50

1

Use the __________________operator to return all rows that are common to multiple queries.

Select one of the following:

  • UNION

  • UNION ALL

  • MINUS

  • INTERSECT

Explanation

Question 36 of 50

1

Use the ______________operator to return rows returned by the first query that are not present in the second query.

Select one of the following:

  • MINUS

  • INTERSECT

  • UNION

  • UNION ALL

Explanation

Question 37 of 50

1

Which statement discards all pending data changes

Select one of the following:

  • DISCARD

  • SAVEPOINT

  • ROLLBACK

  • COMMIT

Explanation

Question 38 of 50

1

Which of the following commands removes rows and a table structure?

Select one of the following:

  • REMOVE TABLE

  • ALTER TABLE

  • DROP TABLE

  • DELETE TABLE

Explanation

Question 39 of 50

1

Which of the following commands is a part of the Data Manipulation Language?

Select one of the following:

  • TRUNCATE

  • DROP

  • ALTER

  • SELECT

Explanation

Question 40 of 50

1

Which of the following commands is a part of the Data Definition Language?

Select one of the following:

  • DELETE

  • UPDATE

  • SELECT

  • CREATE

Explanation

Question 41 of 50

1

Which of the following constraints does not exist?

Select one of the following:

  • UNIQUE

  • CHECK

  • NOT NULL

  • DEFAULT

Explanation

Question 42 of 50

1

Consider the EMPLOYEES table. Which of the following SQL statements is correct to display the last name of the employee with its hire date providing the Employee and Hire Date aliases (case is important)?

Select one of the following:

  • SELECT last_name AS 'Employee', hire_date AS 'Hire Date' FROM employees;

  • SELECT last_name "Employee", hire_date "Hire Date" FROM employees;

  • SELECT last_name Employee, hire_date Hire Date FROM employees;

  • SELECT last_name AS Employee, hire_date AS Hire Date FROM employees;

Explanation

Question 43 of 50

1

Consider the EMPLOYEES table. Which of the following SQL statements is correct to provide the sentence in the format "King has been working since 01.01.1987" with "Employee Information" alias?

Select one of the following:

  • SELECT last_name || ' has been working since ' || hire_date Employee Information FROM employees;

  • SELECT last_name || ' has been working since ' || hire_date 'Employee Information' FROM employees;

  • SELECT last_name || " has been working since " || hire_date "Employee Information" FROM employees;

  • SELECT last_name || ' has been working since ' || hire_date "Employee Information" FROM employees;

Explanation

Question 44 of 50

1

What will be the result of the following SQL statement?

Select one of the following:

  • he number of employees within each department will be displayed

  • An error will occur since the GROUP BY clause is missing

  • The unique department ids will be displayed

  • The number of departments will be displayed

Explanation

Question 45 of 50

1

Which of the following SQL statements will not generate an error?

Select one of the following:

  • SELECT department_id Dep, COUNT(last_name) Num FROM employees GROUP BY department_id HAVING Num > 5

  • SELECT department_id Dep, COUNT(last_name) FROM employees GROUP BY Dep

  • SELECT last_name Name FROM employees WHERE Name like 'K%'

  • SELECT last_name Name FROM employees ORDER BY Name

Explanation

Question 46 of 50

1

Consider the EMPLOYEES table. Which condition in the WHERE clause limit the employees to those whose salary is greater than 5000 but less than 18000?

Select one of the following:

  • WHERE salary > 5000 AND salary > 18000

  • WHERE salary > 5000 AND salary < 18000

  • WHERE salary < 5000 AND salary > 18000

  • WHERE salary > 5000 OR salary < 18000

Explanation

Question 47 of 50

1

Consider the EMPLOYEES table. Which condition in the WHERE clause limit the employees to IT programmers with salary greater than 5000?

Select one of the following:

  • WHERE salary > 5000 AND job_id = 'IT_PROG'

  • WHERE salary > 5000 OR job_id = 'IT_PROG'

  • WHERE salary > 5000 AND job_id = "IT_PROG"

  • WHERE salary > 5000 AND job_id = IT_PROG

Explanation

Question 48 of 50

1

Consider the EMPLOYEES table. Which condition in the WHERE clause limit the employees to those who work in the departments 90 and 60?

Select one of the following:

  • WHERE department_id BETWEEN 60 AND 90

  • WHERE department_id BETWEEN 90 AND 60

  • WHERE department_id = 90 OR department_id = 60

  • WHERE department_id = 90 AND department_id = 60

Explanation

Question 49 of 50

1

Consider the EMPLOYEES table. Which condition in the WHERE clause limit the employees to those who do not work in the departments 90 and 60?

Select one of the following:

  • WHERE department_id = 90 OR department_id = 60

  • WHERE department_id NOT IN (90, 60)

  • WHERE department_id = 90 AND department_id = 60

  • WHERE department_id IN (90, 60)

Explanation

Question 50 of 50

1

Consider the EMPLOYEES table. Which condition in the WHERE clause limit the employees to those whose last name and first name starts with the letter ‘K’?

Select one of the following:

  • WHERE last_name LIKE 'K%' and first_name LIKE 'K%'

  • WHERE last_name LIKE 'K_' and first_name LIKE 'K_'

  • WHERE last_name = 'K%' and first_name = 'K%'

  • WHERE last_name and first_name = 'K%'

Explanation