• Interesting article, but as someone else mentioned, it has the disadvantage of needing to modify all occurences of where the stored procedure name is used.

    An alternative is something like :-

    create procedure aaa

    as

    exec aaa;2

    go

    create procedure aaa;2

    as

    select 'first version'

    go

    exec aaa returns 'first version'

    exec aaa will always run the lastest version of the stored procedure

    if we want to modify the stored procedure, but keep the old version for reference, we can do this :-

    create procedure aaa;3

    as

    select 'second version'

    go

    alter procedure aaa;1

    as

    exec aaa;3

    go

    exec aaa now returns 'second version'

    Obviously this will only work if you dont need to change the parameters to the stored procedure between versions.

    You could just as easily use names with '_<number>' as grouped stored procedures, which allows you to drop older versions if you build up too many.