Identify the correct output --- select LAST_DAY(TO_DATE('01-SEP-1995', 'DD-MON-YYYY')) from dual;
select LAST_DAY(TO_DATE('01-SEP-1995', 'DD-MON-YYYY')) from dual;
31-AUG-1995
30-SEP-1995
31-OCT-1995
31-DEC-1995
Which functions mentioned below are GROUP functions? Choose all that apply
ADD_MONTHS
COUNT
ROUND
DISTINCT
AVG
SUM
WHERE clause is used to restrict groups
True
False
One can NOT delete a row from the VIEW if view definition contains ... Choose all that apply
WHERE clause
GROUP BY clause
GROUP functions
DISTINCT keyword
FROM clause
An application developer wants to query row count of a table, ORDERS which has millions of records. ORDERS table has composite PRIMARY KEY on (ORDER_ID, CUSTOMER_ID) columns and those two columns appear at position 1 and 2 respectively in the ORDERS table. Which query will be more efficient?
select count(*) from orders;
select count(1) from orders;
select count(3) from orders;
select count(5) from orders;
Identify the MANDATORY sections of a PL/SQL block
DECLARE
BEGIN
EXCEPTION
END
%ROWTYPE attribute is used to declare a variable and associate it's data type with the TABLE/CURSOR object.
Within a PL/SQL block, which commands are allowed? Choose all that apply
SELECT
CREATE
DELETE
DROP
UPDATE
INSERT
INSERT, UPDATE, DELETE commands when used in a PL/SQL block, should contain INTO clause to hold the data returned by SQL statement
IF-THEN-ELSE-ENDIF construct is used for conditional control in a PL/SQL block. What happens if the condition in IF-THEN-ELSE-ENDIF block evaluates to NULL?
The SQL statements in the IF condition are processed.
The SQL statements in the ELSE condition are processed.
IF-THEN-ELSE-ENDIF construct is skipped.
The SQL statements in the IF condition as well as ELSE condition are processed.