Which Two SQL Statements Execute on TRANSACTIONS Table?

Column aliases The SQL SELECT statement
Answer Correct answer: A, D — Statements A and D execute successfully because they use valid column alias syntax: double-quoted reserved word DATE and properly quoted aliases.

Examine the description of the TRANSACTIONS table: Which two SQL statements execute successfully? (Choose two.) - image

  1. SELECT customer_id AS “CUSTOMER_ID”, transaction_date AS “DATE”, amount + 100 DUES FROM transactions; Correct Answer
  2. SELECT customer_id AS ‘CUSTOMER_ID’, transaction_date AS DATE, amount + 100 ‘DUES’ FROM transactions;
  3. SELECT customer_id AS “CUSTOMER_ID”, transaction_date AS DATE, amount + 100 “DUES” FROM transactions;
  4. SELECT customer_id AS CUSTOMER_ID, transaction_date AS TRANS_DATE, amount + 100 “DUES AMOUNT” FROM transactions; Correct Answer
  5. SELECT customer_id CUSTID, transaction_date TRANS_DATE, amount + 100 DUES FROM transactions;

Community Votes

AD
80%
DE
20%

80% of anonymous learners picked answer AD. Votes are pick records left by other test-takers — they are not the verified answer.

Community Insight

Tests column alias rules: single quotes are invalid for aliases, DATE is a reserved word requiring double quotes, and AS is optional for valid identifiers.

This Oracle 1Z0-071 question tests column alias syntax using the TRANSACTIONS table. It confirms that statements A and D execute successfully because they correctly use double quotes for the reserved word DATE and properly quote aliases with spaces.

Selecting E as a correct answer because aliases without AS are valid; however, the question asks for two, and the exam key expects A and D, though E also works in real Oracle.

Community Discussion (5 comments)

ArslanAltaf 👍 2
ADE correct.
Misi_Oracle 👍 4
A,D,E is correct. Tested. Feel free to try SELECT 'abc' AS "customer_id", Sysdate as "date", 10+100 Dues FROM DUAL; {ASS SELECT 'abc' AS 'customer_id', Sysdate as date, 10+100 'Dues' FROM DUAL; Fail because single quote for alias and not double quote on date. Alias cannot be in a single quote and date must be in a double quote as date is saved as a datatype SELECT 'abc' AS "customer_id", Sysdate as DATE, 10+100 "Dues" FROM DUAL; FAIL. No double quote for date SELECT 'abc' AS "customer_id", Sysdate as TRANS_DATE, 10+100 "Dues AMOUNT" FROM DUAL; PASS SELECT 'abc' CUSTID, Sysdate TRANS_DATE, 10+100 Dues FROM DUAL; PASS
amizh 👍 1 Selected: DE
IT works 1) with as keyword , 2) with double quote 3) with out ANY quote but NOT WITH SINGLE QUOTE. Tested.
id10111110 👍 1 Selected: AD
Based on the question, A, E and E are correct. Single quotes aren't allowed for column names, and DATE requires double quotes since DATE is a key word.
JUMP56 👍 3 Selected: AD
A, D, E are correct

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

Expert Analysis

Why the Answer Is Correct

Statements A and D execute successfully because they follow Oracle's column alias syntax. In A, the aliases "CUSTOMER_ID" and "DATE" are enclosed in double quotes—essential for the reserved word DATE—while DUES is a valid unquoted alias. D uses AS with unquoted aliases CUSTOMER_ID and TRANS_DATE, and a double-quoted alias "DUES AMOUNT" that contains a space. Both statements are syntactically valid and will run against the TRANSACTIONS table.

Why the Other Options Are Wrong

Option B fails because single quotes denote string literals, not identifiers; AS DATE is also invalid since DATE is reserved. Option C fails because transaction_date AS DATE attempts to use a reserved word unquoted, causing a syntax error. Option E, while syntactically valid in Oracle (unquoted aliases without AS are allowed), is not selected by the exam key. Community testers confirm E also executes, making this a flawed 'Choose two' question.

Community Comment Notes

Misi_Oracle tested directly and states "A,D,E is correct. Tested." noting that single quotes for aliases fail. JUMP56 and ArslanAltaf also confirm "A, D, E are correct." amizh explains works with AS, double quotes, or no quote but not single quotes. id10111110 notes single quotes are invalid and DATE needs double quotes. The consensus is that three statements are valid, but the exam expects two.

Official Reference

Exam Strategy

When you find more valid statements than the requested number, re-examine for reserved words or syntax quirks. In this question, A and D are the intended answers; select them and move on without overthinking.

Frequently Asked Questions

Why does option E execute successfully but is not in the answer key?

Option E uses valid Oracle syntax: aliases can omit AS and need no quotes if not reserved. The question is flawed because it asks for two, but E also works.

Why does option B fail in Oracle?

Option B uses single quotes for aliases, which Oracle treats as string literals, not identifiers. Also, DATE is a reserved word and cannot be an unquoted alias.

More 1Z0-071 FAQ →

Related Analysis

← Back to 1Z0-071 Study Guide