Information Schema PARAMETERS Table

The Information Schema PARAMETERS table stores information about stored procedures and stored functions parameters.

It contains the following columns:

Column Description
SPECIFIC_CATALOG Always def.
SPECIFIC_SCHEMA Database name containing the stored routine parameter.
SPECIFIC_NAME Stored routine name.
ORDINAL_POSITION Ordinal position of the parameter, starting at 1. 0 for a function RETURNS clause.
PARAMETER_MODE One of IN, OUT, INOUT or NULL for RETURNS.
PARAMETER_NAME Name of the parameter, or NULL for RETURNS.
DATA_TYPE The column's data type.
CHARACTER_MAXIMUM_LENGTH Maximum length.
CHARACTER_OCTET_LENGTH Same as the CHARACTER_MAXIMUM_LENGTH except for multi-byte character sets.
NUMERIC_PRECISION For numeric types, the precision (number of significant digits) for the column. NULL if not a numeric field.
NUMERIC_SCALE For numeric types, the scale (significant digits to the right of the decimal point). NULL if not a numeric field.
DATETIME_PRECISION Fractional-seconds precision, or NULL if not a time data type.
CHARACTER_SET_NAME Character set if a non-binary string data type, otherwise NULL.
COLLATION_NAME Collation if a non-binary string data type, otherwise NULL.
DTD_IDENTIFIER Description of the data type.
ROUTINE_TYPE PROCEDURE or FUNCTION.

Information from this table is similar to that found in the param_list column in the mysql.proc table, and the output of the SHOW CREATE PROCEDURE and SHOW CREATE FUNCTION statements.

To obtain information about the routine itself, you can query the Information Schema ROUTINES table.

Example

SELECT * FROM information_schema.PARAMETERS
LIMIT 1 \G
********************** 1. row **********************
        SPECIFIC_CATALOG: def
         SPECIFIC_SCHEMA: accounts
           SPECIFIC_NAME: user_counts
        ORDINAL_POSITION: 1
          PARAMETER_MODE: IN
          PARAMETER_NAME: user_order
               DATA_TYPE: varchar
CHARACTER_MAXIMUM_LENGTH: 255
  CHARACTER_OCTET_LENGTH: 765
       NUMERIC_PRECISION: NULL
           NUMERIC_SCALE: NULL
      DATETIME_PRECISION: NULL
      CHARACTER_SET_NAME: utf8
          COLLATION_NAME: utf8_general_ci
          DTD_IDENTIFIER: varchar(255)
            ROUTINE_TYPE: PROCEDURE
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.

© 2021 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.
https://mariadb.com/kb/en/information-schema-parameters-table/