I hope it's ok to make a posting like this.
I have been using SQL for quite some time and people at work have been using 2 different ways to return the same number or rows in a database.
DepartmentID IN (SELECT DepartmentID
Department LIKE '%Engineering')
INNER JOIN Employees
ON Departments.DepartmentID = Employees.DepartmentID
Departments.Department LIKE '%Engineering'
In this case, both are equivalent. However, for the one with the INNER JOIN, if there is more than 1 department selected with the same DepartmentID, employees with that DepartmentID will be returned multiple times.
SQL is a declarative language, which means that the language is not supposed to say how the query should be performed, only what result should be found. It is up to the DMBS to work out how to perform it.
A decent SQL database will probably optimize them to both do the same or similar things.
To check if they are doing the same thing, run
EXPLAIN on the query.
If they have the same steps, obviously they will take the same amount of time to run. Otherwise, you will see what ways the database is treating the differently. How the DBMS optimizes it is implementation dependent. So the best way is to use
Note: EXPLAIN is an SQL command, just like SELECT etc. See http://www.sql.org/sql-database/postgresql/manual/sql-explain.html.
Assuming it executes with the same steps, the way you write it will be the way you think appears clearest what the intention is.