Note
This view was introduced in OceanBase Database V2.2.77.
Purpose
The information_schema.PARAMETERS view displays the information about the parameters and returns values for stored procedures.
Note
This view was introduced in OceanBase Database V2.2.77.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| SPECIFIC_CATALOG | varchar(512) | NO | The catalog. The value of this column is always def. |
| SPECIFIC_SCHEMA | varchar(128) | NO | The name of the database. |
| SPECIFIC_NAME | varchar(64) | NO | The name of the stored procedure containing the parameter. |
| ORDINAL_POSITION | bigint(20) | NO | The position of the parameter (the value is 0 for the return value of a function). |
| PARAMETER_MODE | varchar(5) | NO | The mode of the parameter. Valid values:
|
| PARAMETER_NAME | varchar(64) | YES | The name of the parameter. |
| DATA_TYPE | varchar(64) | NO | The data type of the parameter. |
| CHARACTER_MAXIMUM_LENGTH | bigint(20) | NO | The maximum length in characters for the parameter if it is a string parameter. |
| CHARACTER_OCTET_LENGTH | bigint(20) | NO | The maximum length in bytes for the parameter if it is a string parameter. |
| NUMERIC_PRECISION | bigint(20) unsigned | NO | The numeric precision for the parameter if it is a numeric parameter. |
| NUMERIC_SCALE | bigint(20) | NO | The numeric scale for the parameter if it is a numeric parameter. |
| DATETIME_PRECISION | bigint(20) unsigned | NO | The datetime precision for the parameter if it is a temporal parameter. |
| CHARACTER_SET_NAME | varchar(64) | NO | The character set name for the parameter if it is a string parameter. |
| COLLATION_NAME | varchar(64) | NO | The collation for the parameter if it is a string parameter. |
| DTD_IDENTIFIER | longtext | NO | The detailed information about the data type recorded in characters. |
| ROUTINE_TYPE | varchar(9) | NO | The type of the stored procedure (procedure or function). |
Sample query
View the parameters and return values of stored procedures in the current tenant.
obclient[test]> SELECT * FROM information_schema.PARAMETERS\G
The query result is as follows:
*************************** 1. row ***************************
SPECIFIC_CATALOG: def
SPECIFIC_SCHEMA: test
SPECIFIC_NAME: citycount
ORDINAL_POSITION: 1
PARAMETER_MODE: IN
PARAMETER_NAME: country
DATA_TYPE: char
CHARACTER_MAXIMUM_LENGTH: 3
CHARACTER_OCTET_LENGTH: 12
NUMERIC_PRECISION: NULL
NUMERIC_SCALE: NULL
DATETIME_PRECISION: NULL
CHARACTER_SET_NAME: utf8mb4
COLLATION_NAME: utf8mb4_general_ci
DTD_IDENTIFIER: char(3)
ROUTINE_TYPE: PROCEDURE
*************************** 2. row ***************************
SPECIFIC_CATALOG: def
SPECIFIC_SCHEMA: test
SPECIFIC_NAME: citycount
ORDINAL_POSITION: 2
PARAMETER_MODE: OUT
PARAMETER_NAME: cities
DATA_TYPE: int
CHARACTER_MAXIMUM_LENGTH: NULL
CHARACTER_OCTET_LENGTH: NULL
NUMERIC_PRECISION: 11
NUMERIC_SCALE: 0
DATETIME_PRECISION: NULL
CHARACTER_SET_NAME: binary
COLLATION_NAME: binary
DTD_IDENTIFIER: int(11)
ROUTINE_TYPE: PROCEDURE
2 rows in set