Delete all MS SQL Stored Procedure

Here is a code that you can user to delete all ms sql stored procedure

DECLARE @procedureName varchar(500)
DECLARE cur CURSOR
      FOR SELECT [name] FROM sys.objects WHERE type = 'p'
      OPEN cur

      FETCH NEXT FROM cur INTO @procedureName
      WHILE @@fetch_status = 0
      BEGIN
            EXEC('DROP PROCEDURE ' + @procedureName)
            FETCH NEXT FROM cur INTO @procedureName
      END
      CLOSE cur
      DEALLOCATE cur

4 thoughts on “Delete all MS SQL Stored Procedure

  1. Pingback: South Carolina

  2. Pingback: Get More Information

  3. Pingback: hair extension

  4. Pingback: You Can Find It Here

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.