Here is the structure and data of the CUST_TRANS table: Exhibit: Dates are stored in the
default date format dd-mm-rr in the CUST_TRANS table. Which three SQL statements
would execute successfully? (Choose three.)
A.
SELECT transdate + ’10’ FROM cust_trans;
B.
SELECT custno + ‘A’ FROM cust_trans WHERE transamt > 2000;
C.
SELECT * FROM cust_trans WHERE transdate=’01-JANUARY-07′;
D.
SELECT * FROM cust_trans WHERE transdate = ’01-01-07′;
E.
SELECT transamt FROM cust_trans WHERE custno > ’11’;
A-D-E
SQL> select value from v$nls_parameters where parameter=’NLS_DATE_FORMAT’;
VALUE
——————————————————————————–
dd-mm-rr
A)
SQL> SELECT transdate + ’10’ FROM cust_trans;
TRANSDAT
——–
11-01-07
11-02-07
11-03-07
B)
SQL> SELECT custno + ‘A’ FROM cust_trans WHERE transamt > 2000;
SELECT custno + ‘A’ FROM cust_trans WHERE transamt > 2000
*
ERROR at line 1:
ORA-01722: invalid number
c)
SQL> SELECT * FROM cust_trans WHERE transdate=’01-JANUARY-07′;
CUSTNO TRANSDAT TRANSAMT
—— ——– ———-
11 01-01-07 1000
D)
SQL> SELECT * FROM cust_trans WHERE transdate = ’01-01-07′;
CUST_N TRANSDAT TRANSAMT
—— ——– ———-
11 01-01-07 1000
E)
SQL> SELECT transamt FROM cust_trans WHERE custno > ’11’;
TRANSAMT
———-
1000
1000
RPTA:
A,C,D,E