Skip to content
Advertisement

Multiple joins in SQL statement

To clear things up, I have two tables, employees and jobs.

In employees I have columns firstname, lastname, employees id.

In jobs I have columns

where the last two are foreign keys which refer to the employees table.

This is my SQL statement

And I fill data table with it.

What I need is adding two more columns, like second first name and second last name, in same table, but which will depend on job_responsible_p, so ON clause would be

Is that possible in one query?

Advertisement

Answer

Yes, you can join several table at once:

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement