Oracle Certification Exam Question:
Download Questions PDF

Suppose you need to generate a list of all customer last names with their credit limits from the
CUSTOMERS table. Those customers who do not have a credit limit should appear last in the list.
Which two queries would achieve the required result? (Choose two.)
A. SELECT cust_last_name,cust_credit_limit
FROM customers
ORDER BY cust_credit_limit DESC;
B. SELECT cust_last_name,cust_credit_limit
FROM customers
ORDER BY cust_credit_limit;
C. SELECT cust_last_name,cust_credit_limit
FROM customers
ORDER BY cust_credit_limit NULLS LAST;
D. SELECT cust_last_name,cust_credit_limit
FROM customers
ORDER BY cust_last_name,cust_credit_limit NULLS LAST;

Answer:

B. SELECT cust_last_name,cust_credit_limit
FROM customers
ORDER BY cust_credit_limit;
C. SELECT cust_last_name,cust_credit_limit
FROM customers
ORDER BY cust_credit_limit NULLS LAST;

Download Oracle Certification Interview Questions And Answers PDF

Previous QuestionNext Question
Which two statements are true regarding views? (Choose two.)
A. A subquery that defines a view cannot include the GROUP BY clause
B. A view is created with the subquery having the DISTINCT keyword can be updated
C. A view that is created with the subquery having the pseudo column ROWNUM keyword cannot
be updated
D. A Data Manipulation Language (DML) operation can be performed on a view that is created
with the subquery having all the NOT NULL columns of a table
You need to calculate the number of days from 1st Jan 2007 till date:
Dates are stored in the default format of dd-mm-rr.
Which two SQL statements would give the required output? (Choose two.)
A. SELECT SYSDATE - 01-JAN-2007 FROM DUAL
B. SELECT SYSDATE - TO_DATE(01/JANUARY/2007) FROM DUAL;
C. SELECT SYSDATE - TO_DATE(01-JANUARY-2007) FROM DUAL;
D. SELECT TO_CHAR(SYSDATE,DD-MON-YYYY)-01-JAN-2007 FROM DUAL;
E. SELECT TO_DATE(SYSDATE,DD/MONTH/YYYY)-01/JANUARY/2007 FROM DUAL;