
Find the errors in this SQL code:
SELECT first_name, last_name salary FROM employees ORDER BY department_id WHERE hire_date > 01/06/1990;
Thank you for Your Help

Hi,
The ORDER BY class should be after the where condition.
The correct sql is:
SELECT first_name, last_name salary FROM employees WHERE hire_date > 01/06/1990 ORDER BY department_id;
Thanks Deepak

SELECT firstname, lastname salary FROM employees WHERE hiredate > 01/06/1990 ORDER BY departmentid

Hi,
Another error is sql:
You should specify the date in double quotes and it should be in YYYY-MM-DD format. Here is the corrected sql:
SELECT first_name, last_name salary FROM employees WHERE hire_date > '1990-06-01' ORDER BY department_id;
Thanks
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.