Back to Top

list down and than delete all the procedured you have in a db


list down all the procedured you have in a db



select  *   from DBName.information_schema.routines   where routine_type = 'PROCEDURE'





 SELECT 'DROP PROCEDURE [' + SCHEMA_NAME(p.schema_id) + '].[' + p.NAME + ']'
FROM sys.procedures p

and than it will list you procedure with drop


DROP PROCEDURE [dbo].[USP_abc]
DROP PROCEDURE [dbo].[USP_def]
DROP PROCEDURE [dbo].[USP_ghi]
DROP PROCEDURE [dbo].[USP_pqr]

0comments

Post a Comment