Oracle Database SQL Expert
Question No: 121
Which SQL statement would display the view names and definitions of all the views owned by you?
SELECTviewjiame, text FROM user_view;
SELECTviewjiame, text FROM user_object;
SELECTviewjiame, text FROM user_objects;
SELECTview_name, text FROM user views;
Question No: 122
View the Exhibit and examine the description of the PRODUCT_INFORMATION table.
SELECT product_name, list_price, min_price, list_price – min_price Difference FROM product_information
Which options when used with the above SQL statement can produce the sorted output in ascending order of the price difference between LIST_PRICE and MIN_PRICE? (Choose all that apply.)
ORDER BY 4
ORDER BY MIN_PRICE
ORDER BY DIFFERENCE
ORDER BY LIST_PRICE
ORDER BY LIST_PRICE – MIN_PRICE
Question No: 123
Which two statements are true regarding subqueries? (Choose three.)
The ORDER BY clause can be used in the subquery.
A subquery can be used in the FROM clause of a SELECT statement.
If the subquery returns NULL, the main query may still return result rows.
A subquery can be placed in a WHERE clause, GROUP BY clause, or a HAVING clause.
Logical operators, such as AND, OR and NOT, cannot be used in the WHERE clause of a subquery.
Question No: 124
Evaluate the following statement:
WHEN order_total lt; 10000 THEN INTO small_orders
WHEN order_total gt; 10000 AND order_total lt; 20000 THEN INTO medium_orders
WHEN order_total gt; 2000000 THEN INTO large_orders
SELECT order_id, order_total, customer_id FROM orders;
Which statement is true regarding the evaluation of rows returned by the subquery in the INSERT statement?
They are evaluated by all the three WHEN clauses regardless of the results of the evaluation of any other WHEN clause.
They are evaluated by the first WHEN clause. If the condition is true, then the row would be evaluated by the subsequent WHEN clauses.
They are evaluated by the first WHEN clause. If the condition is false, then the row would be evaluated by the subsequent WHEN clauses.
The INSERT statement would give an error because the ELSE clause is not present for support in case none of the WHEN clauses are true.
Question No: 125
View the Exhibit and examine the structure of the EMPLOYEES and DEPARTMENTS tables.
Which SET operator would you use in the blank space in the following SQL statement to list the departments where all the employees have managers?
SELECT department_id FROM departments
SELECT department_id FROM employees
WHERE manager_id IS NULL;
Question No: 126
Evaluate the following query: SELECT INTERVAL 300#39; MONTH, INTERVAL 54-2#39; YEAR TO MONTH,
INTERVAL #39;11:12:10.1234567#39; HOUR TO SECOND
What is the correct output of the above query?
A. 25-00, 54-02, 00 11:12:10.123457
B. 00-300, 54-02, 00 11:12:10.123457
C. 25-00, 00-650, 00 11:12:10.123457
D. 00-300, 00-650, 00 11:12:10.123457
Question No: 127
Which two statements are true regarding the execution of the correlated subqueries? (Choose two.)
The nested query executes after the outer query returns the row.
The nested query executes first and then the outer query executes.
The outer query executes only once for the result returned by the inner query.
Each row returned by the outer query is evaluated for the results returned by the inner query.
Question No: 128
Evaluate the following SQL statement:
SELECT product_name || #39;it#39;s not available for order#39; FROM product_information
WHERE product_status = #39;obsolete#39;;
You received the following error while executing the above query: ERROR:
ORA-01756: quoted string not properly terminated What would you do to execute the query successfully?
Enclose the character literal string in the SELECT clause within the double quotation marks.
Do not enclose the character literal string in the SELECT clause within the single quotation marks.
Use Quote (q) operator and delimiter to allow the use of single quotation mark in the literal character string.
Use escape character to negate the single quotation mark inside the literal character string in the SELECT clause.
Question No: 129
View the Exhibit and examine the details of the PRODUCT_INFORMATION table.
Evaluate the following SQL statement:
SELECT TO_CHAR(list_price ,#39;$9,999quot;) FROM product_information;
Which two statements would be true regarding the output for this SQL statement? (Choose two.)
The LIST_PRICE column having value 1123.90 would be displayed as $1,124.
The LIST_PRICE column having value 1123.90 would be displayed as $1,123.
The LIST_PRICE column having value 11235.90 would be displayed as $1,123.
The LIST_PRICE column having value 11235.90 would be displayed as #######.
Question No: 130
Which three statements are true regarding single-row functions? (Choose three.)
They can accept only one argument.
They can be nested up to only two levels.
They can return multiple values of more than one data type.
They can be used in SELECT, WHERE, and ORDER BY clauses.
They can modify the data type of the argument that is referenced.
They can accept a column name, expression, variable name, or a user-supplied constant as arguments.
|Lowest Price Guarantee||Yes||No||No|
|Free VCE Simulator||Yes||No||No|