is there any way to get the list of the inbuilt function of the sql server?

社会主义新天地 提交于 2020-02-28 09:49:00

问题


SELECT *
FROM sysobjects
WHERE xtype='p'

above query will give us the list of all procedures in the database, in the same way how can I get the list of internal functions?


回答1:


Try this

SELECT name, definition, type_desc 
FROM sys.sql_modules m 
INNER JOIN sys.objects o ON m.object_id=o.object_id
WHERE type_desc like '%function%'

Or else:

SELECT * FROM sys.all_objects where type in ('FN','AF','FS','FT','IF','TF')

Here are the types:

--AF = Aggregate function (CLR)
--C = CHECK constraint
--D = DEFAULT (constraint or stand-alone)
--F = FOREIGN KEY constraint
--PK = PRIMARY KEY constraint
--P = SQL stored procedure
--PC = Assembly (CLR) stored procedure
--FN = SQL scalar-function
--FS = Assembly (CLR) scalar function
--FT = Assembly (CLR) table-valued function
--R = Rule (old-style, stand-alone)
--RF = Replication filter procedure
--SN = Synonym
--SQ = Service queue
--TA = Assembly (CLR) trigger
--TR = SQL trigger 
--IF = SQL inlined table-valued function
--TF = SQL table-valued function
--U = Table (user-defined)
--UQ = UNIQUE constraint
--V = View
--X = Extended stored procedure
--IT = Internal table

Built-In Function



来源:https://stackoverflow.com/questions/23289458/is-there-any-way-to-get-the-list-of-the-inbuilt-function-of-the-sql-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!