2

我看起来像:

SHOW FUNCTION STATUS

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

谢谢!

4

1 回答 1

6

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

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

...然后是这样的:

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
...

...在最后做类似的事情之前:

mysql> HELP bin
Name: 'BIN'
Description:
Syntax:
BIN(N)

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

如何生成自己的列表!

以下查询(在mysql数据库上)在一个列表中提供了所有函数及其类别:

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而不是;

于 2012-11-22T16:54:26.510 回答