IF EXISTS ( SELECT * FROM sysobjects WHERE id = object_id(N'function_name') AND xtype IN (N'FN', N'IF', N'TF') ) DROP FUNCTION function_name GO
or
IF object_id(N'function_name', N'FN') IS NOT NULL DROP FUNCTION function_name GO
Welcome to my blog site... hope my notes can help your coding becomes more cheerful :)
IF EXISTS ( SELECT * FROM sysobjects WHERE id = object_id(N'function_name') AND xtype IN (N'FN', N'IF', N'TF') ) DROP FUNCTION function_name GO
IF object_id(N'function_name', N'FN') IS NOT NULL DROP FUNCTION function_name GO
No comments:
Post a Comment