Mega Code Archive

 
Categories / MSSQL Tutorial / Procedure 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>