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…
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)- A6% (3)
- B78% (39)
- C12% (6)
- D4% (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
Community Discussion
No community discussion yet for this question.