In relation to writing SQL queries, I could fetch something that I need in two ways:
Type 1:
select
cl.id
from
datahub_clients cl,
datahub_client_accounts cl_ac,
datahub_accounts ac
where
cl.id=cl_ac.client_id
and
ac.id=cl_ac.account_id
and
ac.account_no_dataphile="7H0010A1"
;
Type 2:
select
cl.id
from
datahub_clients cl
join
datahub_client_accounts cl_ac
on
cl.id=cl_ac.client_id
join
datahub_accounts ac
on
ac.id=cl_ac.account_id
where
ac.account_no_dataphile="7H0010A1"
;
Following are the few queries in my mind: 1) Is there any difference between how the SQL compiler interprets them? 2) Should there be preference around any one? (Why?) 3) From scalability perspective, which one is better?