删除存储过程

DECLARE @STRING VARCHAR(8000)
WHILE EXISTS(SELECT NAME FROM SYSOBJECTS WHERE TYPE='P' AND STATUS>=0)
BEGIN
SELECT @STRING='DROP PROCEDURE '+NAME FROM SYSOBJECTS WHERE TYPE = 'P' AND STATUS>=0
--SELECT @STRING
EXEC(@STRING)
END
posted @ 2008-12-19 09:22  木饭  阅读(148)  评论(0编辑  收藏  举报