Frage 1
Frage
A DISTINCT must always be user in the top-most SELECT statement of a set operation
Frage 2
Frage
A parent table referenced by a child table may not be dropped
Frage 3
Frage
A SELECT statement that is embedded in a clause of another SELECT statement is called
Antworten
-
Main query
-
Subquery
-
Inner query
-
Outer query
Frage 4
Frage
A subquery must be enclosed in _________ .
Antworten
-
Double quotes
-
Single quotes
-
Parantheses
-
Braces
Frage 5
Frage
A table can be created with or without data
Frage 6
Frage
Any user can grant or revoke ant type of system privileges to or from another user.
Frage 7
Frage
Both object and system privileges can be granted through a single role to a user.
Frage 8
Frage
By default, the foreign key restricts deletes of any parent row that has a corresponding child row(s).
Frage 9
Frage
Comparison conditions fall into two classes:
Antworten
-
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)
Frage 10
Frage
Consider the EMPLOYEES table. When condition in the WHERE clause limit the employees to IT Programmers with salary greater than 5000?
Antworten
-
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'
Frage 11
Frage
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?
Antworten
-
WHERE salary > 5000 OR salary < 18000
-
WHERE salary < 5000 AND salary > 18000
-
WHERE salary > 5000 AND salary < 18000
-
WHERE salary >5000 AND salary > 18000
Frage 12
Frage
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'?
Antworten
-
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%'
Frage 13
Frage
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?
Antworten
-
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
Frage 14
Frage
Consider the EMPLOYEES table. Which condition in the WHERE clause limit the employees to those who work in the department prompted by the user?
Antworten
-
WHERE department_id \= '%Department'
-
WHERE department_id LIKE '%Department'
-
WHERE department_id \= '&Department'
-
WHERE department_id like '_Department'
Frage 15
Frage
Consider the EMPLOYEES table. Which of the following statements displays the date in the 'January, 19 1998'?
Antworten
-
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
Frage 16
Frage
Consider the EMPLOYEES table. Which of the following conditions in the WHERE clause will generate an error?
Antworten
-
SELECT * FROM employees WHERE last_name\='&Name'
-
SELECT job_id, SUM(salary) FROM employees GROUP BY '&Column'
-
SELECT * FROM &Table
-
SELECT &Column FROM employees
Frage 17
Frage
Consider the EMPLOYEES table. Which of the following displays the maximum average salary for each department?
Antworten
-
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
Frage 18
Frage
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?
Antworten
-
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;
Frage 19
Frage
Consider the EMPLOYEES table. Which of the following statements count the number of employees within each department?
Antworten
-
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
Frage 20
Frage
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
Antworten
-
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
Frage 21
Frage
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
Antworten
-
ORDER BY salary;
-
ORDER BY 2;
-
ORDER BY "Salary" ASC;
-
ORDER BY Salary DESC;
Frage 22
Frage
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
Antworten
-
ORDER BY salary;
-
ORDER BY 2;
-
ORDER BY "Salary" ASC;
-
ORDER BY Salary DESC;
Frage 23
Frage
Delete the zip codes 02199 and 43011 from the ZIPCODE table. Make the change permanent.
Antworten
-
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
Frage 24
Frage
Constraints always have a name.
Frage 25
Frage
DML statement such as INSERT, UPDATE, DELETE, and MERGE obtain a lock on the row(s), so other users cannot manipulate it.
Frage 26
Frage
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:
Antworten
-
SELECT * FROM userb.employees;
-
SELECT * FROM employees;
-
SELECT * FROM usera.employees;
-
SELECT * FROM employees.userb;
Frage 27
Frage
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.
Frage 28
Frage
Privileges, roles, and synonyms are all used to implement security in an Oracle Database.
Frage 29
Frage
Queries containing set operators are called ______ .
Antworten
-
Compound queries
-
Subqueries
-
Inner queries
-
Outer queries
Frage 30
Frage
Queries that return more than one row from the inner SELECT statement are called
Frage 31
Frage
Queries that return only one row from the inner SELECT statement are called
Frage 32
Frage
What will be the result of the following SQL statement?
SELECT INITCAP(SUBSTR(CONCAT('Hello',world),4,3)) FROM DUAL;
Frage 33
Frage
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
Antworten
-
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
Frage 34
Frage
What will be the result of the following query?
SELECT ROUND (63.548, -1) FROM DUAL;
Frage 35
Frage
What will be the result of the following SQL statement?
SELECT SUBSTR ('Hello,World!!!',13) FROM DUAL
Frage 36
Frage
The ______ operator compares a value to every value returned by a subquery.
Frage 37
Frage
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.
Frage 38
Frage
The data dictionary view USER_TAB_PRIVS_MADE lists details of table privilege grants performed by the current user.
Frage 39
Frage
The data of a temporary table is visible to all session.
Frage 40
Frage
The NUMBER data types is usually the best choice for a primary key.
Frage 41
Frage
The subquery generally executes ______ , and its output is used to complete the query condition for the main (or ____ ) query.{
Antworten
-
First, outer
-
Last, outer
-
Last, inner
-
First, inner
Frage 42
Frage
The TRANCATE command and the TRUNC function can be used interchangeably.
Frage 43
Frage
The TRUNCATE command removes all data permanently from a table.
Frage 44
Frage
The UNION and UNION ALL set operator have the opposite effect other.
Frage 45
Frage
The ____ operator compares a value to EACH value returned by a subquery
Frage 46
Frage
The ____ operator returns all rows that are selected by either query
Antworten
-
UNION ALL
-
INTERSECT
-
UNION
-
MINUS
Frage 47
Frage
The ______ constraint defines a condition that each row must satisfy.
Antworten
-
PRIMARY KEY
-
CHECK
-
UNIQUE
-
FOREIGN KEY
Frage 48
Frage
To obtain a list of last names that students and instructors share, you use the MINUS set operator
Frage 49
Frage
Transaction control determines when data manipulates becomes permanent in a database.
Frage 50
Frage
Use the _____ operator to return all rows from multiple tables and eliminate any duplicate rows.
Antworten
-
UNION
-
MINUS
-
UNION ALL
-
INTERSECT
Frage 51
Frage
What will be the result of the following SQL statement? (SYSDATE is a date of your exam)
SELECT TO_CHAR(SYSDATE, 'Day') FROM Dual;
Antworten
-
31.05.2013
-
Friday
-
31
-
31-05.2013
Frage 52
Frage
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;{
Antworten
-
31.May.2013
-
An error will occur
-
31.05.2013
-
31.05.13
Frage 53
Frage
When executed, this statement cannot be rolled back
Antworten
-
ALTER TABLE
-
DROP TABLE
-
REMOVE TABLE
-
DELETE TABLE
Frage 54
Frage
When inserting data into a table form another table, the table names and columns must be the same.
Frage 55
Frage
When using LIKE condition which symbol is used to denote one character?
Frage 56
Frage
When using LIKE conditions which symbol is used to denote zero or many characters?
Frage 57
Frage
Which command is used to view the structure of the table LOCATIONS?
Antworten
-
DESCRIBE LOCATIONS
-
SHOW STRUCTURE LOCATIONS
-
SELECT * FROM LOCATIONS
-
PRINT LOCATIONS
Frage 58
Frage
Which is right of the following clauses?
Antworten
-
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
Frage 59
Frage
Which keyword is used to eliminate duplicate rows in the result?
Antworten
-
DISTINCT
-
DESCRIBE
-
HAVING
-
GROUP BY
Frage 60
Frage
Which keyword is used to provide an alias to a column?
Frage 61
Frage
Which of the following clauses is used to limit the rows that are retrieved by the query?
Antworten
-
WHERE
-
ORDER BY
-
FROM
-
GROUP BY
Frage 62
Frage
Which of the following functions finds the numeric position of a named character?
Frage 63
Frage
Which of the following functions is not single-row function?
Frage 64
Frage
Which of the following functions joins two strings together?
Frage 65
Frage
Which of the following is a concatenation operator?
Frage 66
Frage
Which of the following SQL statements will generate an error?
Antworten
-
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
Frage 67
Frage
Which of the following statements about aliases is NOT true?
Antworten
-
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
Frage 68
Frage
Which of the following statements is NOT true?
Antworten
-
SQL statements are no case sensitive
-
Keywords cannot be abbreviated
-
SQL statement can be only one line
-
Keywords cannot be split across lines
Frage 69
Frage
Which statement discards all pending data changes
Antworten
-
SAVEPOINT
-
COMMIT
-
DISCARD
-
ROLLBACK
Frage 70
Frage
Which symbol do you use if you need to choose all the columns from the table to the result query?
Frage 71
Frage
Which symbol is used to create a substitution variable?{
Frage 72
Frage
Write SQL statement for display the department numbers with more than employees in each dept.
Antworten
-
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;
Frage 73
Frage
Write SQL statement for display the names of the employees who are working in the company for the past 5 years:
Antworten
-
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);
Frage 74
Frage
Write SQL statement for increase salary of all managers by 10%
Antworten
-
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);
Frage 75
Frage
You can add and drop columns from a table using the ALTER TABLE command.
Frage 76
Frage
You can nor (not?) selectively delete rows a table.
Frage 77
Frage
You can place the subquery in a number of SQL clauses, including the following:
I. WHERE clause
II. HAVING clause
III. FROM clause
Antworten
-
I and II
-
I,II and III
-
I only
-
I and III
Frage 78
Frage
You can update only a single column at a time in a table.
Frage 79
Frage
You cannot drop a user if objects exist in the user's schema.
Frage 80
Frage
You cannot order the results of a set operation
Frage 81
Frage
______ clause can be used and is required in the subquery to perform Top-N analysis.
Antworten
-
HAVING
-
ORDER BY
-
GROUP BY
-
WHERE