I want to automate some little procedures. this involves checking if a query returns results, so i want to do something like:
if ( select* from table where col1 = value >= 1 rows returned)
do this stuff
else
do this other stuff
end if
How do i do this in sql server?