获取数据库中存储过程的定义
获取某一存储过程的参数列表
select tb.name as typename,ta.* from syscolumns as ta
inner join systypes as tb on
ta.xtype = tb.xtype
where ta.id in
(select id From sysobjects as a
where OBJECTPROPERTY(id, N'IsProcedure')=1
and id = OBJECT_ID(N'[dbo].[SP_POPULATECPIACCOUNTINBATCH]'))
and tb.name<>'sysname'
order by ta.colid asc
inner join systypes as tb on
ta.xtype = tb.xtype
where ta.id in
(select id From sysobjects as a
where OBJECTPROPERTY(id, N'IsProcedure')=1
and id = OBJECT_ID(N'[dbo].[SP_POPULATECPIACCOUNTINBATCH]'))
and tb.name<>'sysname'
order by ta.colid asc