Alex Q
Test por , creado hace más de 1 año

Exam Test sobre Theory of database (Meirzhan), creado por Alex Q el 26/03/2019.

124
5
0
Alex Q
Creado por Alex Q hace alrededor de 5 años
Cerrar

Theory of database (Meirzhan)

Pregunta 1 de 81

1

A DISTINCT must always be user in the top-most SELECT statement of a set operation

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 2 de 81

1

A parent table referenced by a child table may not be dropped

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 3 de 81

1

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

Selecciona una de las siguientes respuestas posibles:

  • Main query

  • Subquery

  • Inner query

  • Outer query

Explicación

Pregunta 4 de 81

1

A subquery must be enclosed in _________ .

Selecciona una de las siguientes respuestas posibles:

  • Double quotes

  • Single quotes

  • Parantheses

  • Braces

Explicación

Pregunta 5 de 81

1

A table can be created with or without data

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 6 de 81

1

Any user can grant or revoke ant type of system privileges to or from another user.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 7 de 81

1

Both object and system privileges can be granted through a single role to a user.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 8 de 81

1

By default, the foreign key restricts deletes of any parent row that has a corresponding child row(s).

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 9 de 81

1

Comparison conditions fall into two classes:

Selecciona una de las siguientes respuestas posibles:

  • Single-column operators (>, \=, >\=, <, <>,<\=) and multiple-column operators (IN, ANT, ALL)

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

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

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

Explicación

Pregunta 10 de 81

1

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

Selecciona una de las siguientes respuestas posibles:

  • WHERE salary>5000 AND job_id \= 'IT_PROG'

  • WHERE salary>5000 AND job_id \= "IT_PROG"

  • WHERE salary>5000 AND job_id \= IT_PROG

  • WHERE salary>5000 OR job_id \= 'IT_PROG'

Explicación

Pregunta 11 de 81

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?

Selecciona una de las siguientes respuestas posibles:

  • WHERE salary > 5000 OR salary < 18000

  • WHERE salary < 5000 AND salary > 18000

  • WHERE salary > 5000 AND salary < 18000

  • WHERE salary >5000 AND salary > 18000

Explicación

Pregunta 12 de 81

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'?

Selecciona una de las siguientes respuestas posibles:

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

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

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

  • WHERE last_name and first_name \= 'K%'

Explicación

Pregunta 13 de 81

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?

Selecciona una de las siguientes respuestas posibles:

  • WHERE department_id \= 90 AND department_id \= 60

  • WHERE department_id IN (90,60)

  • WHERE department_id NOT IN (90,60)

  • WHERE department_id \=90 PR department_id \= 60

Explicación

Pregunta 14 de 81

1

Consider the EMPLOYEES table. Which condition in the WHERE clause limit the employees to those who work in the department prompted by the user?

Selecciona una de las siguientes respuestas posibles:

  • WHERE department_id \= '%Department'

  • WHERE department_id LIKE '%Department'

  • WHERE department_id \= '&amp;Department'

  • WHERE department_id like '_Department'

Explicación

Pregunta 15 de 81

1

Consider the EMPLOYEES table. Which of the following statements displays the date in the 'January, 19 1998'?

Selecciona una de las siguientes respuestas posibles:

  • SELECT TO_DATE(hire_date,'fmMONTH, DD YYYY') FROM employees

  • SELECT TO_DATE(hire_date,'fmMON, DD YEAR') FROM employees

  • SELECT TO_CHAR(hire_date,'fmMonth, DD YYYY') FROM employees

  • SELECT TO_DATE(hire_date,'fmMonth, DD YYYY') FROM employees

Explicación

Pregunta 16 de 81

1

Consider the EMPLOYEES table. Which of the following conditions in the WHERE clause will generate an error?

Selecciona una de las siguientes respuestas posibles:

  • SELECT * FROM employees WHERE last_name\='&amp;Name'

  • SELECT job_id, SUM(salary) FROM employees GROUP BY '&amp;Column'

  • SELECT * FROM &amp;Table

  • SELECT &amp;Column FROM employees

Explicación

Pregunta 17 de 81

1

Consider the EMPLOYEES table. Which of the following displays the maximum average salary for each department?

Selecciona una de las siguientes respuestas posibles:

  • SELECT MAX(AVG(salary)) FROM employees

  • SELECT department_id, MAX(AVG(salary)) FROM employees GROUP BY department_id

  • SELECT MAX(AVG(salary)) FROM employees GROUP BY department_id

  • SELECT AVG(MAX(salary)) FROM employees GROUP BY department_id

Explicación

Pregunta 18 de 81

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?

Selecciona una de las siguientes respuestas posibles:

  • 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;

Explicación

Pregunta 19 de 81

1

Consider the EMPLOYEES table. Which of the following statements count the number of employees within each department?

Selecciona una de las siguientes respuestas posibles:

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

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

  • SELECT department_id, COUNT(last_name) FROM departments GROUP_BY last_name

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

Explicación

Pregunta 20 de 81

1

Consider the following SQL statement. What will be the result? SELECT e.last_name, e.salary, d.department_name FROM employees e, departments d WHERE e.department_id \= d.department_id

Selecciona una de las siguientes respuestas posibles:

  • An error will occur since none of the JOIN operations is used

  • An error will occur since in the SELECT clause a column thet is used to join the tables is missing

  • The last names of the employees and their salaries will be displayed along with the departments names where the employees work

  • The Cartesian product of the two tables based on the department_id column will be displayed

Explicación

Pregunta 21 de 81

1

Consider the SQL statement. Which of the following clauses does not sort the result rows by the salary values in the ascending order? SELECT last_name "Employee", salary "Salary" FROM employees

Selecciona una de las siguientes respuestas posibles:

  • ORDER BY salary;

  • ORDER BY 2;

  • ORDER BY "Salary" ASC;

  • ORDER BY Salary DESC;

Explicación

Pregunta 22 de 81

1

Consider the SQL statement. Which of the following clauses does not sort the result rows by salary value in the ascending order?
SELECT last_name "Employee", salary "Salary"
FROM employees

Selecciona una de las siguientes respuestas posibles:

  • ORDER BY salary;

  • ORDER BY 2;

  • ORDER BY "Salary" ASC;

  • ORDER BY Salary DESC;

Explicación

Pregunta 23 de 81

1

Delete the zip codes 02199 and 43011 from the ZIPCODE table. Make the change permanent.

Selecciona una de las siguientes respuestas posibles:

  • DELETE FROM zipcode WHERE zip ANY ('02199','43011') COMMIT

  • DELETE FROM zipcode WHERE zip ANY ('02199','43011')

  • DELETE FROM zipcode WHERE zip IN ('02199','43011') COMMIT

  • DELETE FROM zipcode WHERE zip ALL ('02199','43011') COMMIT

Explicación

Pregunta 24 de 81

1

Constraints always have a name.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 25 de 81

1

DML statement such as INSERT, UPDATE, DELETE, and MERGE obtain a lock on the row(s), so other users cannot manipulate it.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 26 de 81

1

If there are schemas named USERA and USERB, and both have an EMPLOYEES table, then if USERA wants to access the EMPLOYEES table that belongs to USERB, USERA must write select statement as follows:

Selecciona una de las siguientes respuestas posibles:

  • SELECT * FROM userb.employees;

  • SELECT * FROM employees;

  • SELECT * FROM usera.employees;

  • SELECT * FROM employees.userb;

Explicación

Pregunta 27 de 81

1

It is possible to combine from two tables that do not have a primary key/foreign key relationship into one result using a set operation.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 28 de 81

1

Privileges, roles, and synonyms are all used to implement security in an Oracle Database.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 29 de 81

1

Queries containing set operators are called ______ .

Selecciona una de las siguientes respuestas posibles:

  • Compound queries

  • Subqueries

  • Inner queries

  • Outer queries

Explicación

Pregunta 30 de 81

1

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

Selecciona una de las siguientes respuestas posibles:

  • Multiple-row subqueries

  • Multiple-column subqueries

  • Sing-column subqueries

  • Single-row subqueries

Explicación

Pregunta 31 de 81

1

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

Selecciona una de las siguientes respuestas posibles:

  • Multiple-column subqueries

  • Single-row subqueries

  • Single-column subqueries

  • Multiple-row subqueries

Explicación

Pregunta 32 de 81

1

What will be the result of the following SQL statement?
SELECT INITCAP(SUBSTR(CONCAT('Hello',world),4,3)) FROM DUAL;

Selecciona una de las siguientes respuestas posibles:

  • LLO

  • Llo

  • Low

  • LOW

Explicación

Pregunta 33 de 81

1

What will be the result of the following SQL statement?
SELECT count(d.department_name), l.city
FROM departments d NATURAL JOIN locations l
GROUP BY l.city

Selecciona una de las siguientes respuestas posibles:

  • The number of department in all cities is shown

  • The number of departments in EACH city is shown.

  • An error will occur since the GROUP BY clause cannot be used with NATURAL JOIN

  • The number if departments in one particular city is shown

Explicación

Pregunta 34 de 81

1

What will be the result of the following query?
SELECT ROUND (63.548, -1) FROM DUAL;

Selecciona una de las siguientes respuestas posibles:

  • 64

  • 60

  • 63

  • 70

Explicación

Pregunta 35 de 81

1

What will be the result of the following SQL statement?
SELECT SUBSTR ('Hello,World!!!',13) FROM DUAL

Selecciona una de las siguientes respuestas posibles:

  • An error will occur, since SUBSTR function need to take 3 parameters

  • Hello,World!!!13

  • !!!

  • Hello, World!

Explicación

Pregunta 36 de 81

1

The ______ operator compares a value to every value returned by a subquery.

Selecciona una de las siguientes respuestas posibles:

  • NOT

  • ALL

  • SOME

  • ANY

Explicación

Pregunta 37 de 81

1

The condition INSERT FIRST command evaluates the WHEN condition in order. For all conditions that are true a row is inserted into the appropriate table.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 38 de 81

1

The data dictionary view USER_TAB_PRIVS_MADE lists details of table privilege grants performed by the current user.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 39 de 81

1

The data of a temporary table is visible to all session.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 40 de 81

1

The NUMBER data types is usually the best choice for a primary key.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 41 de 81

1

The subquery generally executes ______ , and its output is used to complete the query condition for the main (or ____ ) query.{

Selecciona una de las siguientes respuestas posibles:

  • First, outer

  • Last, outer

  • Last, inner

  • First, inner

Explicación

Pregunta 42 de 81

1

The TRANCATE command and the TRUNC function can be used interchangeably.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 43 de 81

1

The TRUNCATE command removes all data permanently from a table.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 44 de 81

1

The UNION and UNION ALL set operator have the opposite effect other.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 45 de 81

1

The ____ operator compares a value to EACH value returned by a subquery

Selecciona una de las siguientes respuestas posibles:

  • NOT

  • ANY

  • SOME

  • ALL

Explicación

Pregunta 46 de 81

1

The ____ operator returns all rows that are selected by either query

Selecciona una de las siguientes respuestas posibles:

  • UNION ALL

  • INTERSECT

  • UNION

  • MINUS

Explicación

Pregunta 47 de 81

1

The ______ constraint defines a condition that each row must satisfy.

Selecciona una de las siguientes respuestas posibles:

  • PRIMARY KEY

  • CHECK

  • UNIQUE

  • FOREIGN KEY

Explicación

Pregunta 48 de 81

1

To obtain a list of last names that students and instructors share, you use the MINUS set operator

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 49 de 81

1

Transaction control determines when data manipulates becomes permanent in a database.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 50 de 81

1

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

Selecciona una de las siguientes respuestas posibles:

  • UNION

  • MINUS

  • UNION ALL

  • INTERSECT

Explicación

Pregunta 51 de 81

1

What will be the result of the following SQL statement? (SYSDATE is a date of your exam)
SELECT TO_CHAR(SYSDATE, 'Day') FROM Dual;

Selecciona una de las siguientes respuestas posibles:

  • 31.05.2013

  • Friday

  • 31

  • 31-05.2013

Explicación

Pregunta 52 de 81

1

What will be the result of the following SQL statement? (SYSDATE is a date of your exam)
SELECT TO_CHAR(SYSDATE, 'DD.MM.YY') FROM Dual;{

Selecciona una de las siguientes respuestas posibles:

  • 31.May.2013

  • An error will occur

  • 31.05.2013

  • 31.05.13

Explicación

Pregunta 53 de 81

1

When executed, this statement cannot be rolled back

Selecciona una de las siguientes respuestas posibles:

  • ALTER TABLE

  • DROP TABLE

  • REMOVE TABLE

  • DELETE TABLE

Explicación

Pregunta 54 de 81

1

When inserting data into a table form another table, the table names and columns must be the same.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 55 de 81

1

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

Selecciona una de las siguientes respuestas posibles:

  • _

  • +

  • %

  • *

Explicación

Pregunta 56 de 81

1

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

Selecciona una de las siguientes respuestas posibles:

  • +

  • *

  • %

  • _

Explicación

Pregunta 57 de 81

1

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

Selecciona una de las siguientes respuestas posibles:

  • DESCRIBE LOCATIONS

  • SHOW STRUCTURE LOCATIONS

  • SELECT * FROM LOCATIONS

  • PRINT LOCATIONS

Explicación

Pregunta 58 de 81

1

Which is right of the following clauses?

Selecciona una de las siguientes respuestas posibles:

  • SELECT... WHERE ... ORDER BY ... GROUP BY

  • SELECT ... FROM ... GROUP BY ... ORDER BY ... WHERE

  • SELECT...FROM...WHERE...GROUP BY...ORDER BY

  • SELECT ... FROM ... WHERE ... ORDER BY ... GROUP BY

Explicación

Pregunta 59 de 81

1

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

Selecciona una de las siguientes respuestas posibles:

  • DISTINCT

  • DESCRIBE

  • HAVING

  • GROUP BY

Explicación

Pregunta 60 de 81

1

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

Selecciona una de las siguientes respuestas posibles:

  • COLUMN

  • AS

  • ALIAS

  • IS

Explicación

Pregunta 61 de 81

1

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

Selecciona una de las siguientes respuestas posibles:

  • WHERE

  • ORDER BY

  • FROM

  • GROUP BY

Explicación

Pregunta 62 de 81

1

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

Selecciona una de las siguientes respuestas posibles:

  • CONCAT

  • INSTR

  • TRIM

  • SUBSTR

Explicación

Pregunta 63 de 81

1

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

Selecciona una de las siguientes respuestas posibles:

  • CONCAT

  • SUM

  • UPPER

  • ROUND

Explicación

Pregunta 64 de 81

1

Which of the following functions joins two strings together?

Selecciona una de las siguientes respuestas posibles:

  • CONCAT

  • TRIM

  • INSTR

  • SUBSTR

Explicación

Pregunta 65 de 81

1

Which of the following is a concatenation operator?

Selecciona una de las siguientes respuestas posibles:

  • &amp;

  • ||

  • *

  • +

Explicación

Pregunta 66 de 81

1

Which of the following SQL statements will generate an error?

Selecciona una de las siguientes respuestas posibles:

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

  • SELECT last_name Name FROM employees ORDER BY Name

  • 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

Explicación

Pregunta 67 de 81

1

Which of the following statements about aliases is NOT true?

Selecciona una de las siguientes respuestas posibles:

  • The keyboard AS between an alias and a column name is optional

  • Aliases always require double quotation marks

  • Aliases immediately follows the column name

  • Aliases rename column heading

Explicación

Pregunta 68 de 81

1

Which of the following statements is NOT true?

Selecciona una de las siguientes respuestas posibles:

  • SQL statements are no case sensitive

  • Keywords cannot be abbreviated

  • SQL statement can be only one line

  • Keywords cannot be split across lines

Explicación

Pregunta 69 de 81

1

Which statement discards all pending data changes

Selecciona una de las siguientes respuestas posibles:

  • SAVEPOINT

  • COMMIT

  • DISCARD

  • ROLLBACK

Explicación

Pregunta 70 de 81

1

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

Selecciona una de las siguientes respuestas posibles:

  • %

  • All

  • +

  • *

Explicación

Pregunta 71 de 81

1

Which symbol is used to create a substitution variable?{

Selecciona una de las siguientes respuestas posibles:

  • &amp;

  • _

  • %

  • *

Explicación

Pregunta 72 de 81

1

Write SQL statement for display the department numbers with more than employees in each dept.

Selecciona una de las siguientes respuestas posibles:

  • Select deptno, count(deptno) from emp group by deptno having count(*)>3;

  • Select deptno, count(deptno) from deptno group by emp having count(*)>3;

  • Select deptno, count (emp) from deptno group by emp having count(*)>2;

  • Select deptno, count (deptno) from emp group by deptno having count(*)>2;

Explicación

Pregunta 73 de 81

1

Write SQL statement for display the names of the employees who are working in the company for the past 5 years:

Selecciona una de las siguientes respuestas posibles:

  • Select ename from emp where hiredate < add_month(sysdate,-60);

  • Select ename from emp where hiredate < add_month(sysdate,-5);

  • Select ename from emp where hiredate < add_month(sysdate,+60);

  • Select ename from emp where hiredate < add_month(sysdate,+5);

Explicación

Pregunta 74 de 81

1

Write SQL statement for increase salary of all managers by 10%

Selecciona una de las siguientes respuestas posibles:

  • Update emp set sal\=sal*1.1 where empno in (select mgr from emo);

  • Update emp set sal\=sal*0.1 where empno in (select mgr from emo);

  • Update emp set sal\=sal*0.1 where empno in (select emp from emo);

  • Update emp set sal\=sal*1.1 where empno in (select emp from emo);

Explicación

Pregunta 75 de 81

1

You can add and drop columns from a table using the ALTER TABLE command.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 76 de 81

1

You can nor (not?) selectively delete rows a table.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 77 de 81

1

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

Selecciona una de las siguientes respuestas posibles:

  • I and II

  • I,II and III

  • I only

  • I and III

Explicación

Pregunta 78 de 81

1

You can update only a single column at a time in a table.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 79 de 81

1

You cannot drop a user if objects exist in the user's schema.

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 80 de 81

1

You cannot order the results of a set operation

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 81 de 81

1

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

Selecciona una de las siguientes respuestas posibles:

  • HAVING

  • ORDER BY

  • GROUP BY

  • WHERE

Explicación