Actually, it may surprise you:
if exists (select TOP 1 fname from names where fname like 'Sadra')
return 1
return 0
if exists (select * from names where fname like 'Sadra')
return 1
return 0
This does depend on the version of SQL Server you're using. If you're using pre 2005 then, well just don't ^_^
The first version actually asks the query to do something. It should automatically ignore that, but I would worry.
The second version can be optimised by the compiler easier. It won't search the whole table because it know the minimum required to fulfill the "EXISTS" operator.
also, your "LIKE" is wrong. you need to include wildcards ('%') or it is just a less efficient '='
Hope that helps ^_^
Andy