It would eliminate issues such as https://connect.microsoft.com/SQLServer/feedback/details/622784/denali-ssms-proliferation-of-the-use-of-deprecated-system-tables-e-g-sysobjects if dbo-level users were given access to the "secret sauce" that is used to generate the new object templates or when a DROP and CREATE of an existing procedure is created using the "Script <object> as"... commands.If the reason that the logic uses IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[XXX]') AND type in (N'FN', N'IF', N'TF', N'FS', N'FT'))DROP FUNCTION [dbo].[XXX]GOinstead ofIF OBJECT_ID(N'[dbo].[XXX]') IS NOT NULLDROP FUNCTION [dbo].[XXX]GOso that all 4 function object types can be checked, then the OBJECT_ID function should be made more flexible (ie, except multiple object types)
Category
Proposed Solution
Benefits
Other Benefits