mysql - SQL Error in WHERE clause -
i have tables
department: id, name employee: id, departmentid, name, surname departmentid foreign key referencing department(id) query:
select * employee employee.departmentid = department.id; returns error "unknown column department.id in clause"
i can't place error. how fix this?
thanks
you need include department table
select * employee join department on employee.departmentid = department.id; this uses explicit join syntax ansi standard. should refrain implicit joins.
Comments
Post a Comment