skip to main content
Schema Management : Schema Objects : Procedures Columns Table: OA_PROCCOLUMNS
 

Procedures Columns Table: OA_PROCCOLUMNS

The OA_ PROCCOLUMNS table contains information about stored procedure columns. It contains one row for every column of a procedure defined by the IP. This information is used to support the SQLProcedureColumns ODBC call.
If the schema request is mapped to a function call, the cursor opened when information about procedure columns is returned must match the column sequence and types as described in the following table. The column name is not important.
 
Table 122: Definition of Procedure Columns Catalog Table OA_PROCCOLUMNS 
Column Name
Type
Len
Description
OA_QUALIFIER
WVARCHAR
128
Name of database in which the procedure is created.
OA_OWNER
WVARCHAR
128
The owner of the procedure.
SYSTEM – the procedure is managed by the owner of the table.
OAUSER – the procedure is managed by the IP.
OA_NAME
WVARCHAR not NULL
128
Name of the procedure.
COLUMN_NAME
WVARCHAR not NULL
128
Name of the column of the specified procedure.
OA_COLUMNTYPE
SMALLINT
Defines the procedure column as parameter or a result set column:
SQL_PARAM_TYPE_UNKNOWN(0) – type unknown
SQL_PARAM_INPUT (1) – input parameter
SQL_PARAM_INPUT_OUTPUT (2) – input/output parameter
SQL_PARAM_OUTPUT (3) – output parameter
SQL_RETURN_VALUE (4) – return value of a procedure
SQL_RESULT_COL (5) – result set column
Only the SQL_PARAM_INPUT type of columns is supported in this version.
DATA_TYPE
SMALLINT not NULL
Data type of this column. See Table 118 for the number corresponding to the supported types.
TYPE_NAME
WVARCHAR not NULL
254
Identifies the column type. Used to display to end user. The table owner uses information from the data_type column. See Table 118 for the name.
OA_PRECISION
INTEGER
The number of digits of mantissa precision.
NUMERIC – Number of digits
CHAR and VARCHAR – set to same as OA_LENGTH
Others – null
OA_LENGTH
INTEGER
The maximum length for character data types. Set other data types to NULL.
CHAR and VARCHAR – maximum length of the string
Other data types – NULL
OA_RADIX
INTEGER
Reserved for future use. Set to NULL.
OA_SCALE
INTEGER
The total number of significant digits to the right of the decimal point. Only required for NUMERIC data types.
OA_NULLABLE
SMALLINT not NULL
Determines whether the column can be null:
XO_NO_NULLS (0) - No nulls allowed
XO_NULLABLE (1) - Can be null
XO_NULLABLE_UNKNOWN (2) - Nullable unknown
REMARKS
WVARCHAR
254
Describes this procedure column.
OA_COLUMN_DEF
wvarchar
128
The default value of the column. The value in this column should be interpreted as a string if it is enclosed in quotation marks.
If the default value was specified as NULL, then this column is the word NULL, not enclosed in quotation marks. If the default value cannot be represented without truncation, then this column contains TRUNCATED, with no enclosing single quotation marks. If no default value was specified, then this column is NULL.
The value of COLUMN_DEF can be used in generating a new column definition, except when it contains the value TRUNCATED.
OA_SQL_DATA_TYPE
smallint not NULL
15
The value of the SQL data type as it appears in the SQL_DESC_TYPE field of the descriptor. This column is the same as the DATA_TYPE column except for datetime data types DATE, TIME, TIMESTAMP.
For datetime data types, the OA_SQL_DATA_TYPE field in the result set will be SQL_DATETIME (9), and the OA_SQL_DATETIME_SUB field will return the subcode for the specific datetime data type (SQL_CODE_DATE, SQL_CODE_TIME or SQL_CODE_TIMESTAMP).
OA_SQL_DATETIME_SUB
smallint
16
The subtype code for datetime data types. For other data types, this column returns a NULL.
SQL_CODE_DATE=1
SQL_CODE_TIME=2
SQL_CODE_TIMESTAMP=3
OA_CHAR_OCTET_ LENGTH
integer
17
The maximum length in bytes of a character or binary data type column. For all other data types, this column returns a NULL.
OA_ORDINAL_ POSITION
integer not NULL
18
The ordinal position of the column in the table. The first column in the table is column number 1.
OA_IS_NULLABLE
wvarchar
19
NO if the column does not include NULLs.
YES if the column could include NULLs.
This column returns a zero-length string if the nullability is unknown.
The value returned for this column is different from the value returned for the NULLABLE column. (See the description of the NULLABLE column.)
OA_SCOPE
SMALLINT
Reserved for future use. Set to NULL.