nerdexam
Oracle

1Z0-007 · Question #164

Which SQL statement generates the alias Annual Salary for the calculated column SALARY*12?

The correct answer is B. SELECT ename, salary*12 "Annual Salary". This SQL statement provides correct syntax to generate the alias Annual Salary for the calculated column SALARY*12. Incorrect Answers A: Alias can be surrounded with double quotation marks, not with single. Oracle error will be generated in this case. C: Alias needs to be…

Basic SQL SELECT Statements

Question

Which SQL statement generates the alias Annual Salary for the calculated column SALARY*12?

Options

  • ASELECT ename, salary*12 `Annual Salary'
  • BSELECT ename, salary*12 "Annual Salary"
  • CSELECT ename, salary*12 AS Annual Salary
  • DSELECT ename, salary*12 AS INITCAP("ANNUAL SALARY") FROM employees

How the community answered

(50 responses)
  • A
    6% (3)
  • B
    78% (39)
  • C
    12% (6)
  • D
    4% (2)

Explanation

This SQL statement provides correct syntax to generate the alias Annual Salary for the calculated column SALARY*12. Incorrect Answers A: Alias can be surrounded with double quotation marks, not with single. Oracle error will be generated in this case. C: Alias needs to be surrounded with double quotation marks, it cannot just follow by the AS D: You cannot use any function as alias, so this SQL statement will fail.

Topics

#column aliases#double quotes#spaces in alias#calculated columns

Community Discussion

No community discussion yet for this question.

Full 1Z0-007 Practice