The DESCRIBE_PROCEDURE stored procedure provides a brief description of a PL stored procedure.
The DESCRIBE_PROCEDURE stored procedure identifies the name of the stored procedure and returns information about each parameter of the stored procedure.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support this feature.
Syntax
DBMS_DESCRIBE.DESCRIBE_PROCEDURE(
object_name IN VARCHAR2,
reserved1 IN VARCHAR2,
reserved2 IN VARCHAR2,
overload OUT NUMBER_TABLE,
position OUT NUMBER_TABLE,
datalevel OUT NUMBER_TABLE,
argument_name OUT VARCHAR2_TABLE,
datatype OUT NUMBER_TABLE,
default_value OUT NUMBER_TABLE,
in_out OUT NUMBER_TABLE,
datalength OUT NUMBER_TABLE,
dataprecision OUT NUMBER_TABLE,
scale OUT NUMBER_TABLE,
radix OUT NUMBER_TABLE,
spare OUT NUMBER_TABLE
include_string_constraints OUT BOOLEAN DEFAULT FALSE);
Parameters
| Parameter | Description |
|---|---|
| object_name | The name of the stored procedure to be described. This parameter follows the rules for identifiers in SQL. The object name can be a synonym. This parameter is required and cannot be empty. The total length of the name cannot exceed 197 bytes. |
| reserved1 reserved2 | Reserved for future use. Must be set to NULL or an empty string. |
| overload | A unique number assigned to the signature of the stored procedure. If the stored procedure is overloaded, this field stores different values for each version of the stored procedure. |
| position | The position of the parameter in the parameter list. |
| datalevel | If the parameter is a composite type, such as a record, this parameter returns the level of the data type. |
| argument_name | The name of the parameter associated with the stored procedure to be described. |
| datatype | The data type of the described parameter. The data types and their numeric type codes are as follows:
|
| default_value | 1 if the described parameter has a default value; 0 otherwise. |
| in_out | The mode of the parameter. The parameter mode is as follows:
|
| datalength | For a %rowtype parameter, returns the length constraint; otherwise, returns 0. If the include_string_constraints parameter is set to TRUE, returns the length constraint of the parameter (if the parameter type is appropriate). String types are as follows:
|
| dataprecision | If the described parameter is of data type 2 (NUMBER), this parameter specifies the precision of the number. |
| scale | If the described parameter is of data type 2 (NUMBER), this parameter specifies the number of decimal places. |
| radix | If the described parameter is of data type 2 (NUMBER), this parameter specifies the base of the number. |
| spare | Reserved for future features. |
| include_string_constraints | Default value is FALSE. If set to TRUE, returns the type constraints of the parameter (if the parameter type is appropriate). String types are as follows:
|
Return value
All values of DESCRIBE_PROCEDURE are returned through OUT parameters. These data types are stored in a PL table to accommodate a variable number of parameters.
