exists/not exists select 1 vs select *
Posted on 2010-11-23
Hi, i understand select * has a worse performance than select 1 as it needs to expand the columns etc..
But is there any difference logically between those sql, and are there ever an instance where you must use select * instead of select 1.
select * from table1 where not exists (select 1 from table2)
select * from table1 where not exists (select * from table2)