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