Examine this description of the TRANSACTIONS table:
Which two SQL statements execute successfully? (Choose two.)
Examine this description of the TRANSACTIONS table:
Which two SQL statements execute successfully? (Choose two.)
In option B, the SQL query uses double quotes around 'CUSTOMER-ID' and 'DATE', which are necessary because they include a hyphen and a reserved word respectively. In option D, the SQL query successfully uses aliases without any special characters, reserved words, or incorrect syntax, making it a valid query. Options A and E are incorrect as they use reserved words or invalid characters without double quotes, and option C has invalid syntax due to a hyphen in the alias without quotes.
BD - Correct
A. SELECT customer_id AS "CUSTOMER-ID", transaction_date AS DATE, amount + 100 "DUES" FROM transactions; B. SELECT customer_id AS "CUSTOMER-ID", transaction_date AS "DATE", amount + 100 DUES FROM transactions; C. SELECT customer_id AS CUSTOMER-ID, transaction_date AS TRANS_DATE, amount + 100 "DUES AMOUNT" FROM transactions; D. SELECT customer_id CUSTID, transaction_date TRANS_DATE, amount + 100 DUES FROM transactions; E. SELECT customer_id AS ‘CUSTOMER-ID’, transaction_date AS DATE, amount + 100 ‘DUES AMOUNT’ FROM transactions;
B,D is correct answers.
The correct answers are B, D. A is not correct because the DATE alias uses a reserved word and is not double-quoted.
c is not because of the middle dash in CUSTOMER-ID
Yes BD is okay