加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > MsSql教程 > 正文

SqlServer查看表/存储过程/视图定义

发布时间:2020-12-12 14:32:10 所属栏目:MsSql教程 来源:网络整理
导读:SELECT definitionFROM sys.sql_modules JOIN sys.objectsON sys.sql_modules.object_id=sys.objects.object_id and type='P'and sys.objects.name='your_precdure' type有以下取值 C=约束 ? ? ? ? ? ? ? ? D=默认值 ? ? ? ? ? ? ? F=KEY约束 ? ? ? ? ? ? L=
SELECT definition
FROM sys.sql_modules JOIN sys.objects
ON sys.sql_modules.object_id=sys.objects.object_id 
and type='P'
and sys.objects.name='your_precdure'

type有以下取值

C=约束 ? ? ? ? ? ? ? ?

D=默认值 ? ? ? ? ? ? ?

F=KEY约束 ? ? ? ? ? ?

L=日志?
FN=标量函数 ? ? ? ?

IF=内嵌函数 ? ? ? ?

P=存储过程 ? ? ? ? ?

S=系统表??????????

TF=表函数 ? ? ? ? ? ?

TR=触发器 ? ? ? ? ? ?

U=用户表 ? ? ? ? ? ? ?

V=视图

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读