• If you look throught he source of the built in system stored procs you will see quite a few cases of IF(SELECT COUNT(*)...)>0

    Try sp_helptext 'sp_helptext' for an example!