I have a query like below. But when I run the query, I get an error. How can I write it corrrectly ?
SELECT *
FROM HR.JOBS J JOIN HR.JOB_HISTORY H ON J.JOB_ID=H.JOB_ID
JOIN HR.EMPLOYEES E ON E.JOB_ID=H.JOB_ID
WHERE START_DATE>=93-JAN-01 AND END DATE<=97-AUG-31;
I want to write the sql query showing the job title, department name, employee's full name and start date for all jobs that started on January 1, 1993 and ended on August 31, 1997.
select *is generally a poor practice - and in this particular case, you said you want to select a small number of specific columns from each table. Get in the habit of listing exactly what columns you want in the output in theSELECTclause.'some text'.