Let's say I have a table called Batch, which contains a name and a status for each Batch. The statuses are numeric. Another table, called BatchStatus, status numbers to human-readable strings. So the JOIN below lists all batch names and their statuses in human readable form:
SELECT b.Name, s.Description from Batch b JOIN BatchStatus s on b.StatusNbr = s.StatusNbr
I saw the above query in production code, Googled what JOIN does and understood that the query does what I described above. If I was writing the query myself (yesterday, before I learned about JOINs), I would have written it with a simple where clause:
select b.Name, s.Description from Batch b, BatchStatus s where b.StatusNbr = s.StatusNbr
Are these two queries equivalent? If so, why is the special JOIN syntax needed, when a simple WHERE clause already does the same thing?
Thanks!