Skip to content
Advertisement

Syntax error while using WHERE clause in PostgreSQL

I’m trying to run some queries related to the University database in PostgreSQL. To find students advised by instructors from different departments, I used-

However im getting the following error:

ERROR: syntax error at or near “where”

LINE 3: student join instructor where student.dept_name <> instructo…

Any fix?

Advertisement

Answer

Please try this:

Instead of where you need to use on clause with join.

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