Reputation: 4020
I am new in MySQL. I have created two tables, employee with fields Employeeid(PK),Name, Address and order with fields idOrder(PK) and Employeeid.
I am trying to run this simple join query --
SELECT * FROM employee JOIN order ON employee.Employeeid = order.Employeeid;
However, the select is marked as red and is showing
"SELECT" is not valid at this position for this server version, expecting: '(', WITH
I did some googling and it looks to be a syntax, parsing error, but I am not able to pinpoint the root cause. Any help would be appreciated.
Upvotes: 0
Views: 106
Reputation: 13506
order
is a key word in MySQL
, you need to escape it by using `
SELECT e.* FROM employee e JOIN `order` AS o ON e.Employeeid = o.Employeeid;
Upvotes: 1