In Management Studio 2012, attempting to modify a numbered procedure only yields the first numbered procedure, rather than all versions. Create the following numbered procedure:CREATE PROCEDURE dbo.fooAS SELECT 1;GOCREATE PROCEDURE dbo.foo;2AS SELECT 2;Now different functionality within SSMS treats this "single object" differently: - Right-click procedure > Modify only shows the first version - Right-click procedure > Script as alter only shows the first version - Right-click procedure > Script as Create shows both - Right-click procedure > Script as Drop and Create shows both - Right-click database > Tasks > Generate Scripts shows bothIt is also inconsistent within metadata queries (though I will admit that much of this may be by design): - sp_helptext shows only the first version - sys.sql_modules shows only the first version - INFORMATION_SCHEMA.ROUTINES shows only the first version - OBJECT_DEFINITION shows only the first version - syscomments shows both - sys.numbered_procedures shows only the second versionI know about this bug, which actually caused an error when trying to Modify a numbered procedure, and which was fixed in SQL Server 2008:http://connect.microsoft.com/SQLServer/feedback/details/290112/impossible-to-manage-sps-that-have-multiple-versionsI realize that numbered procedures are deprecated, but while they continue to be supported, the tooling should be consistent in how they are handled. Users will have to manage their existing numbered procedures from the newest version of the tool, even if they are in the lowest version supported by the tool, long after the feature is actually discontinued in the engine.
Operating System Language
Steps to Reproduce