Which SQL statements would execute successfully?

Examine the structure and data of the CUST_TRANS table:
Dates are stored in the default date format dd-mon-rr in the CUST_TRANS table.
Which SQL statements would execute successfully? (Choose three .)

Examine the structure and data of the CUST_TRANS table:
Dates are stored in the default date format dd-mon-rr in the CUST_TRANS table.
Which SQL statements would execute successfully? (Choose three .)

A.
SELECT transdate + ’10’ FROM cust_trans;

B.
SELECT * FROM cust_trans WHERE transdate = ’01-01-07′;

C.
SELECT transamt FROM cust_trans WHERE custno > ’11’;

D.
SELECT * FROM cust_trans WHERE transdate=’01-JANUARY-07′;

E.
SELECT custno + ‘A’ FROM cust_trans WHERE transamt > 2000;



Leave a Reply 4

Your email address will not be published. Required fields are marked *


Poorna

Poorna

Why ans is D and why not B?

nila

nila

Ans : A , C will run succecssfully

ari

ari

There is no implicit conversion from ’01-01-07′ format.
Month has to be specified with abreviation JAN or full name JANUARY to be succesfully converted

Huksha

Huksha

A: 11-JAN-07 00:00:00, … (OK)
B: ORA-01843: not a valid month
C: 2000, 3000 (OK)
D: 11 01-JAN-07 00:00:00 1000 (OK)
E: ORA-01722: invalid number