0
SQL inner joins
Iâm having trouble figuring out exactly how to word the queries. Weâre doing inner joins and I donât have error in it but it wonât give me any results so thereâs something Iâm not getting.. this is the question and my query.. âWrite the SQL statement that reports the employee is, employee full name and their job description. Sort the results by job description, employee last name, and then employee first name.â USE pubs SELECT employee.emp_id, employee.fname, employee.lname as EmployeeID, jobs.job_desc as JobDesc FROM employee INNER JOIN jobs ON employee.emp_id = jobs.job_desc ORDER BY JobDesc, employee.lname
1 Answer
+ 1
The ON condition is wrong. Jobs table should have some column like emp_id, so should be ON employee.emp_id = jobs.emp_id.
Just a guess, for better advice you have to show the table structure