SQL怎么查看和删除存储过程

来源:互联网 发布:te工程师要会编程吗 编辑:程序博客网 时间:2024/05/21 06:41

SQL怎么查看所有的存储过程?

直接贴代码

use 你的数据库名称select a.name,a.[type],b.[definition] from sys.all_objects a,sys.sql_modules b where a.is_ms_shipped=0 and a.object_id = b.object_id and a.[type] in ('P','V','AF') order by a.[name] asc

至于为什么是这样子的呢?直接贴链接
http://www.cnblogs.com/xunziji/archive/2012/08/22/2650822.html

SQL怎么删除存储过程

有的时候建立了一些存储过程但是之后不需要用到了或者这些存储过程本来就是用来测试的,之后要把这些存储过程给删了。直接贴代码:

drop proc 存储过程名
阅读全文
0 0