SQL Server/T-SQL Tutorial/Procedure Function/Drop function
Check the existance of a function
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>
The syntax of the DROP FUNCTION statement
DROP FUNCTION [owner_name.]function_name [, ...]