Sql In Vs Exists
Exist return True or False.
Using IN is better when sub query contains small data.
Using Exist is better when sub query contains large data.
select * from tbl where exists (select id from customer cust where cust.code=tbl.customercode)
Comments
Post a Comment