mysql - SQL command not properly ended trying to join three tables -


i trying sql statement, , stuck. this code trying do idea am trying join 3 tables employees,departments,locations questions **

  • whose employee have (2) 2 departments of same city?

** if possible please give me did wrong in code.

you should have 1 clause , suggest using joins. try this:

select e.firstname, e.salary+1000, d.department_name, e.department_id, l.city employees e inner join departments d on e.department_id = d.department_id inner join locations l on d.location_id = l.location_id 

Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -