• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

GATE | GATE 2017 MOCK II | Question 56

Using the EMPLOYEE table, the following query is issued to generate the name, salary and the salary increased after an appraisal by 25 %. The increased salary for all the employee should be above 25000.
SELECT fname, salary, salary + (salary *0.25) AS "INCREASED_SALARY" 
FROM employee 
WHERE increased_salary > 25000; 
The above query throws an error. What is the reason for the error ?

(A)

The parenthesis is missing in the expression used in SELECT statement.

(B)

Single quotes must be used to define a column alias.

(C)

Column alias cannot be used in the WHERE clause.

(D)

Column alias in the WHERE clause must be enclosed within double quotation marks.

Answer

Please comment below if you find anything wrong in the above post
Feeling lost in the world of random DSA topics, wasting time without progress? It's time for a change! Join our DSA course, where we'll guide you on an exciting journey to master DSA efficiently and on schedule.
Ready to dive in? Explore our Free Demo Content and join our DSA course, trusted by over 100,000 geeks!

Last Updated :
Share your thoughts in the comments