Alternative way of checking whether UDF exists or not in a Table?

 Posted by vishalneeraj-24503 on 7/1/2014 | Category: Sql Server Interview questions | Views: 263 | Points: 40
Answer:

By using count function we can check whether UDF exists or not.Refer below query:-

select count(*) 

from sysobjects
where name = 'your_function_name'
and type = 'fn';

Note:- If function exists in the table then count function will return 1 else 0.


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response