1 Essential Oracle SQL Interview Question *

question badge

What is wrong with the below statement?

select employee_id emp, last_name emp_name, hire_date date 
from employees;
answer badge

date has been used as an alias to the hire_date column, but we cannot use any Oracle reserved keyword as an alias. If want to use it, we have to mention it in quotation marks:

select employee_id emp, last_name emp_name, hire_date "date" 
from employees;
* There is more to interviewing than tricky technical questions, so these are intended merely as a guide. Not every “A” candidate worth hiring will be able to answer them all, nor does answering them all guarantee an “A” candidate. At the end of the day, hiring remains an art, a science — and a lot of work.
Submit an interview question
Submitted questions and answers are subject to review and editing, and may or may not be selected for posting, at the sole discretion of Toptal, LLC.
All fields are required
Thanks for submitting your question.
Our editorial staff will review it shortly. Please note that submitted questions and answers are subject to review and editing, and may or may not be selected for posting, at the sole discretion of Toptal, LLC.
Looking for Oracle SQL experts? Check out Toptal’s Oracle SQL developers.
Pablo Albella
Argentina
Pablo is a highly talented JavaScript and .NET developer with over twelve years of experience in the IT industry and over five of those years spent specializing in .NET development and five in front-end JavaScript frameworks. He has created numerous complex systems and is comfortable working alongside efficient, motivated teams.