devxlogo

Create and Drop Stored Procedures as a Group

Create and Drop Stored Procedures as a Group

Ever created a bunch of stored procedures for testing purposes and went to drop them but couldn’t remember all the names you created? A way to avoid this is to group multiple stored procedures under a single name. The following is the syntax for grouping:

create procedure 1as .... .... GOcreate procedure ;2as .... .... GOExample:create procedure ;1as .... .... GOcreate procedure ;2as .... .... GO

The number assigned for each stored procedure will vary from 1 TO 32767. If you want to execute the stored procedure:

 exec test;1exec test;2 ... etc

Drop all stored procedures using the drop procedure test.

Note: This tip works for all MS SQL 2000 flavors.

See also  How AI Art Generators Can Save Time and Money for Startups
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist