文档首页
MySQL 8.4 参考手册
8.4 中文镜像

MySQL 8.4 参考手册 · 中文镜像

正文为中文,英文原文默认隐藏。点击任意中文段落即可展开 / 收起对应英文原文。

打开官方英文原文 ↗

译文由机器翻译生成,仅供理解参考;有疑问请以官方英文原文为准。

中文点击中文段落可显示 / 隐藏英文原文本页译文覆盖 59%

28.3.20 INFORMATION_SCHEMA PARAMETERS 表28.3.20 The INFORMATION_SCHEMA PARAMETERS Table

PARAMETERS 表提供存储例程(存储过程和存储函数)参数以及存储函数的返回值的信息。PARAMETERS 表不包括内置(本地)函数或可加载函数。The PARAMETERS table provides information about parameters for stored routines (stored procedures and stored functions), and about return values for stored functions. The PARAMETERS table does not include built-in (native) functions or loadable functions.

PARAMETERS 表有以下列:The PARAMETERS table has these columns:

  • SPECIFIC_CATALOG

    包含该参数的例程所属目录的名称。该值始终为 def。The name of the catalog to which the routine containing the parameter belongs. This value is always def.

  • SPECIFIC_SCHEMA

    包含该参数的例程所属的模式(数据库)名称。The name of the schema (database) to which the routine containing the parameter belongs.

  • SPECIFIC_NAME

    包含该参数的例程名称。The name of the routine containing the parameter.

  • ORDINAL_POSITION

    对于存储过程或函数的连续参数,ORDINAL_POSITION 的值分别为 1、2、3,以此类推。对于存储函数,还有一行适用于函数返回值(如 RETURNS 子句所描述)。返回值不是一个真正的参数,因此描述它的行具有以下独特特征:For successive parameters of a stored procedure or function, the ORDINAL_POSITION values are 1, 2, 3, and so forth. For a stored function, there is also a row that applies to the function return value (as described by the RETURNS clause). The return value is not a true parameter, so the row that describes it has these unique characteristics:

    • ORDINAL_POSITION 值为 0。The ORDINAL_POSITION value is 0.

    • PARAMETER_NAME 和 PARAMETER_MODE 的值为 NULL,因为返回值没有名称且模式不适用。The PARAMETER_NAME and PARAMETER_MODE values are NULL because the return value has no name and the mode does not apply.

  • PARAMETER_MODE

    参数的模式。此值为 IN、OUT 或 INOUT 之一。对于存储函数的返回值,此值为 NULL。The mode of the parameter. This value is one of IN, OUT, or INOUT. For a stored function return value, this value is NULL.

  • PARAMETER_NAME

    参数的名称。对于存储函数的返回值,此值为 NULL。The name of the parameter. For a stored function return value, this value is NULL.

  • DATA_TYPE

    参数的数据类型。The parameter data type.

    DATA_TYPE 的值仅为类型名称,不包含其他信息。DTD_IDENTIFIER 的值包含类型名称及可能的其他信息,如精度或长度。The DATA_TYPE value is the type name only with no other information. The DTD_IDENTIFIER value contains the type name and possibly other information such as the precision or length.

  • CHARACTER_MAXIMUM_LENGTH

    对于字符串参数,最大字符长度。For string parameters, the maximum length in characters.

  • CHARACTER_OCTET_LENGTH

    对于字符串参数,最大字节长度。For string parameters, the maximum length in bytes.

  • NUMERIC_PRECISION

    对于数字参数,数值精度。For numeric parameters, the numeric precision.

  • NUMERIC_SCALE

    对于数字参数,数字刻度。For numeric parameters, the numeric scale.

  • DATETIME_PRECISION

    对于时间参数,分秒精度。For temporal parameters, the fractional seconds precision.

  • CHARACTER_SET_NAME

    对于字符字符串参数,字符集名称。For character string parameters, the character set name.

  • COLLATION_NAME

    对于字符字符串参数,排序规则名称。For character string parameters, the collation name.

  • DTD_IDENTIFIER

    参数的数据类型。The parameter data type.

    DATA_TYPE 的值仅为类型名称,不包含其他信息。DTD_IDENTIFIER 的值包含类型名称及可能的其他信息,如精度或长度。The DATA_TYPE value is the type name only with no other information. The DTD_IDENTIFIER value contains the type name and possibly other information such as the precision or length.

  • ROUTINE_TYPE

    PROCEDURE 对于存储过程,FUNCTION 对于存储函数。PROCEDURE for stored procedures, FUNCTION for stored functions.