Skip to content
Advertisement

Show one table that is linked by value to another

I am new to SQL and some points are difficult for me to understand. I have 2 tables:

Departments

Lectors

Departments.head_of_department refers to Lectors.id

I need to display lector who is head of department in Department with name X.

If it’s possible to select ALL table Lectors and ONLY table Lectors without listing all of its columns. For example, a table may have 100 columns and it would be inconvenient to write the names of all of them

Advertisement

Answer

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