SQL error codes
select m.dept_no,m.emp_no,d.dept_nameI am running this code at the very beginning of a query file and after hovering my cursor it shows SELECT is not valid at this position Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'table dept_manager_dup m inner join dept_dup d on m.dept_no=d.dept_no' at line 2
from table dept_manager_dup m
inner join dept_dup d on m.dept_no=d.dept_no
1 answers ( 0 marked as helpful)
Hi Neelanjan!
Thanks for reaching out.
The syntax doesn't require us to write FROM TABLE, but just FROM. In other words, your FROM clause hasn't been written correctly. Here's the correct version of your query.
Best,
Martin
SELECTHope this helps.
m.dept_no, m.emp_no, d.dept_name
FROM
dept_manager_dup m
INNER JOIN
dept_dup d ON m.dept_no = d.dept_no;
Best,
Martin