Option 1:
SELECT a.id
FROM table_a AS a
INNER JOIN table_b AS b
ON a.id = b.id
AND a.name = 'David';
Option 2:
SELECT a.id
FROM table_a AS a
INNER JOIN table_b AS b
ON a.id = b.id
WHERE a.name = 'David';
Is there any difference in the result of these 2 SQL statements? Is there any performance impact if we write filters in Join clause?
When I tried these 2 queries, I saw the same results and performance was not impacted. Please clarify