I executed these Queries
SELECT *
FROM A
INNER JOIN B ON coalesce(A.a1,'') = coalesce(B.a1,'') and A.a1 <> '';
/\
||
Condition in On Clause
and
SELECT *
FROM A
INNER JOIN B ON coalesce(A.a1,'') = coalesce(B.a1,'') WHERE A.a1 <> '';
/\
||
Condition in Where Clause
and get different Result ?
I want to understand what is the Difference between putting filtering condition in On Clause vs Condition in Where claues ,
which one is better in terms of performance ?
Update
Sample Data
a1
is blank ''
in both Tables .
Now with 1st Query i am getting no Rows --> 0 Rows
but with my 2nd Queries i am getting multiple Rows --> 1251 Rows