1

I recently found a query where

SELECT *
FROM
    Table1, Table2
WHERE Table1.Id = Table2.Id

what is the difference of this compared to a join?

Jackal
  • 3,359
  • 4
  • 33
  • 78
  • 2
    this is old style (comma separated join), new standard is specifying the JOIN explicitly. – mkRabbani Aug 02 '19 at 14:02
  • 2
    This explains it in great detail: [Bad habits to kick : using old-style JOINs](https://sqlblog.org/2009/10/08/bad-habits-to-kick-using-old-style-joins) - that old-style *comma-separated list of tables* style was replaced with the *proper* ANSI `JOIN` syntax in the ANSI-**92** SQL Standard (**more than 25 years** ago) and its use is discouraged – marc_s Aug 02 '19 at 14:03
  • 1
    https://stackoverflow.com/questions/1018822/inner-join-on-vs-where-clause – Joe Phillips Aug 02 '19 at 14:03
  • I see, in my company someone showed me this query which I don't even remember seeing before. Glad to confirm it. I will change to a join. – Jackal Aug 02 '19 at 14:04

0 Answers0