-3

For example i have 2 queries:

1)

SELECT * FROM unit
INNER JOIN entity
WHERE unit.length = entity.length

2)

SELECT * FROM unit
INNER JOIN entity ON entity.length = unit.length

Are these queries equivalent?

  • yes, if first work. From my opinion first should be `SELECT * FROM unit, entity WHERE unit.length = entity.length`, but this is terrible code style. – degr Jun 15 '17 at 08:57
  • Dupe train : https://stackoverflow.com/questions/44917/explicit-vs-implicit-sql-joins, https://stackoverflow.com/questions/1018822/inner-join-on-vs-where-clause, https://stackoverflow.com/questions/354070/sql-join-where-clause-vs-on-clause?rq=1.. – Drag and Drop Jun 15 '17 at 09:00
  • Thanks to everyone, yes it is a duplicate, next time I will look more carefully – Igor Laktionov Jun 15 '17 at 09:03

1 Answers1

0

Yes, both the query will produce same result.

Harsh Sharma
  • 910
  • 1
  • 7
  • 20