mysql - when to use join or simple 2 table condition? -


possible duplicate:
sql left join vs multiple tables on line?

i think clearer:

"select * t1,t2 t2.foreignid = t1.id " 

than query join.

are there specs on when use 1 or another?

thanks

personally, prefer explicitness of

select t1.*, t2.* t1  join t2 on t1.id = t2.foreignid 

i see join conditions are, , use where further filter results (current year, user, etc). shouldn't matter in simple query this, longer, more complex queries.

it doesn't make sense me have 1 style shorter queries , different longer ones. simple ones turn complex queries enough.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -