I have 2 sql queried below. What is the most preferred method of getting table1.date > 0
Option1:
select table1.id,table2.firstname, table2.lastname
from table1 join table2 on table1.id = table2.id and table1.date > 0
Option2:
select table1.id,table2.firstname, table2.lastname
from table1 join table2 on table1.id = table2.id where table1.date > 0
I find the second option easier as it is clearer, and I know that data is being filtered by the
WHEREclause.