首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >是否有可能获得所有MySQL系统函数的列表?

问是否有可能获得所有MySQL系统函数的列表?
EN

Stack Overflow用户
提问于 2012-11-23 00:20:35
回答 1查看 2.1K关注 0票数 1

我看起来像这样:

代码语言:javascript
复制
SHOW FUNCTION STATUS

获取当前服务器版本的所有可用系统函数的列表。可以直接从MySQL引擎获取像here这样的表吗?

谢谢!

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-11-23 00:54:27

如果您已经安装了help表(大多数二进制发行版都安装了;如果没有,则有一个名为fill_help_tables.sql的脚本),您可以输入:

代码语言:javascript
复制
mysql> HELP FUNCTIONS
You asked for help about help category: "Functions"
For more information, type 'help <item>', where <item> is one of the following
topics:
       PROCEDURE ANALYSE
categories:
   Bit Functions
   Comparison operators
   Control flow functions
   Date and Time Functions
   Encryption Functions
   Information Functions
   Logical operators
   Miscellaneous Functions
   Numeric Functions
   String Functions

...and,然后类似于:

代码语言:javascript
复制
mysql> HELP String Functions
You asked for help about help category: "String Functions"
For more information, type 'help <item>', where <item> is one of the following
topics:
  ASCII
  BIN
  BINARY OPERATOR
  BIT_LENGTH
  CAST
  CHAR FUNCTION
...

...before最终做了一些类似这样的事情:

代码语言:javascript
复制
mysql> HELP bin
Name: 'BIN'
Description:
Syntax:
BIN(N)

Returns a string representation of the binary value of N, where N is a
....

如何生成您自己的列表!

下面的查询(针对mysql数据库)在一个列表中给出了所有函数及其类别:

代码语言:javascript
复制
SELECT help_category.name, help_topic.name 
FROM help_topic JOIN help_category 
    ON help_category.help_category_id = help_topic.help_category_id 
WHERE help_category.help_category_id IN (
    SELECT help_category_id FROM help_category 
    WHERE parent_category_id=37
) ORDER BY 1;

如果需要每一个的文本描述,只需将description作为列添加到SELECT子句中,尽管它很长,因此您可能希望使用\G而不是;

票数 6
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/13516656

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档