Heim  >  Artikel  >  Datenbank  >  sqlSERVER 查询系统表 函数 存储过程

sqlSERVER 查询系统表 函数 存储过程

WBOY
WBOYOriginal
2016-06-07 15:25:051098Durchsuche

查询表: select * from sys.objects where type='U' 查询存储过程 select * from sys.objects where type='P' 查询存储过程的内容 EXEC Sp_HelpText '存储过程name' 查询自定义函数 select * from dbo.sysobjects WHERE xtype='AF' 查询自定义函数的内容 EXE


查询表:

select * from sys.objects where type='U'


查询存储过程

select * from sys.objects where type='P'

查询存储过程的内容

EXEC Sp_HelpText  '存储过程name'


查询自定义函数
select * from dbo.sysobjects  WHERE xtype='AF'

查询自定义函数的内容

EXEC Sp_HelpText  '自定义函数name'



还有其他的类型  可这样查看

select xtype from dbo.sysobjects  GROUP BY xtype

 

也可以用select * from sys.sql_modules查看内容

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn