I am faceing a prob with subquery .
select * from table1 where col1 in (select col1 from table2)
Here my subquery "select col1 from table2" will return more than one row .So i need to use " IN " clause .
Suppose the result of sub query is zero i,e @@rowcount=0
then i should be able to give a default value to the field col1.
I don't want to use CURSOR since the result set is very large which may affect my performance of proc.
My question is can i use @@rowcount inside a subquery .
or is there any way to solve above situation.
Any suggetions will be appreciated.
Thanks in advance