Home > Database > Mysql Tutorial > body text

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

WBOY
Release: 2016-06-07 15:25:05
Original
1044 people have browsed it

查询表: 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查看内容

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!