SQL Server/T-SQL Tutorial/Procedure Function/Drop function
Check the existance of a function
<source lang="sql">
4> IF EXISTS( 5> SELECT * FROM sys.objects 6> WHERE type = "FN" AND schema_id = SCHEMA_ID("dbo") 7> AND name = "ufnCntCustomers") 8> DROP FUNCTION dbo.ufnCntCustomers 9> GO 1></source>
The syntax of the DROP FUNCTION statement
<source lang="sql">
DROP FUNCTION [owner_name.]function_name [, ...]</source>