简体   繁体   English

是否有列出 SQL Server 中所有内置函数的系统表或系统视图?

[英]Is there a system table or system view that lists all built-in functions in SQL Server?

I am building an application with which users can create their own user-defined functions in a SQL Server database.我正在构建一个应用程序,用户可以使用该应用程序在 SQL Server 数据库中创建自己的用户定义函数。 I have to validate in some way that the function name picked by the user does not equal to the name of a built-in function (such as avg, concat, ...) since this would break the application.我必须以某种方式验证用户选择的函数名称不等于内置函数的名称(例如 avg、concat 等),因为这会破坏应用程序。

Is there a way to query the names of all built-in functions (not the UDFs), such as a system view or any the like?有没有办法查询所有内置函数(不是 UDF)的名称,例如系统视图或任何类似的名称?

I think it is YOUR rule of naming functions, as long as YOU are the developer.我认为这是你命名函数的规则,只要你是开发者。 Which means your functions will have always your prefix in database, as mf_ which could mean m y f unction_ and your user's function name.这意味着你的功能将始终在数据库中的前缀,如mf_这可能平均值m y ˚F unction_和用户的函数名。 In your code always put that mf_ prefix in front of your user's function call, check if it exists and use it.在您的代码中,始终将mf_前缀放在用户的函数调用前面,检查它是否存在并使用它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM