数据库名:Test_DB
1.如何用SQL脚本来列出Test_DB下面所有存储过程
2.如果Test_DB下面有个存储过程cunchu1,如何用SQL脚本将创建cunchu1的脚本导出或者另存为.sql文件
------解决方案--------------------
- SQL code
--得到所有存储过程的名字select name from sysobjects where xtype='p'
------解决方案--------------------
- SQL code
use Test_DBif exists(select top 1 * from sysobjects where xtype='p' and name='cunchu1')exec sp_helptext 'cunchu1'