--sql版本 select b.name,a.text from syscomments a,sysobjects b where a.id = b.id and b.xtype = 'P'
select @@SERVERNAME,db_name(),OBJECT_NAME(a.object_id) as objectName,b.type,b.type_desc, a.definition,OBJECT_NAME(b.parent_object_id) from sys.sql_modules as a inner join sys.objects as b on a.object_id=b.object_id where b.type in ('P')
set nocount on -- 运行前先按 Ctrl+T select object_definition(object_id)+char(13)+char(10)+'GO' from sys.objects where type = 'P' set nocount off 是不是跟 右击存储过程->修改 出来的效果一样啊? 你不是保存源代码脚本吗,与运行有什么关系
select * from syscomments
sp_helptext 'sp'
这两个都可以
给你一个非公开的函数:select object_definition(object_id)
select object_definition(object_id('your_object'))
select b.name,a.text from syscomments a,sysobjects b
where a.id = b.id and b.xtype = 'P'
select @@SERVERNAME,db_name(),OBJECT_NAME(a.object_id) as objectName,b.type,b.type_desc,
a.definition,OBJECT_NAME(b.parent_object_id)
from sys.sql_modules as a
inner join sys.objects as b on a.object_id=b.object_id
where b.type in ('P')
set nocount on
-- 运行前先按 Ctrl+T
select object_definition(object_id)+char(13)+char(10)+'GO' from sys.objects where type = 'P'
set nocount off
是不是跟 右击存储过程->修改 出来的效果一样啊?
你不是保存源代码脚本吗,与运行有什么关系
-- =============================================
-- Author: <WuZhongBao>
-- Create date: <2009-09-23>
-- Description: <计算小区的1X无线容量>
-- =============================================
CREATE PROCEDURE [dbo].[CalcRadioErl1X]
AS
BEGIN
--删除表
IF
-- =============================================
-- Author: <WuZhongBao>
-- Create date: <20090416>
-- Description: <目标邻区无原小区频点,如A-201 配置了B的邻区,但是B没有201频点>
-- =============================================
CREATE PROCEDURE [dbo].[NB_TRX_Error_1X]