您的位置:首页 > 其它

不用sp_helptext直接得到触发器,存储过程,视图的建立语句

2006-03-06 11:11 260 查看
看了一下sp_helptext的内容得到的。

触发器:
select text from sysobjects t,syscomments m where type='TR' and m.id=t.id and t.name=触发器的名字

存储过程:
select text from sysobjects t,syscomments m where type='P' and m.id=t.id and t.name=存储过程的名字
视图:
select text from sysobjects t,syscomments m where type='V' and m.id=t.id and t.name=视图的名字
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐