+1 vote
by

Q. Find the error in the below code snippet if any?
SELECT student_id s_id, student_name name, birthdate date, student_number s_no FROM students;

1 Answer

0 votes
by

Ans :- 

Here, a reserved keyword ‘date’ has been used as an alias for the column birthdate. This action is illegal in Oracle SQL. In order to set a reserved keyword as an alias, we can use quotation marks.
SELECT student_id s_id, student_name name, birthdate “date”, student_number s_no FROM students;

Related questions

0 votes
asked Oct 8, 2022 in JavaScript by rajeshsharma
0 votes
asked Jul 29, 2020 in Oracle by Hodge
...