getProcedureColumns( catalog, schemaPattern, procedureNamePattern, columnNamePattern )

Previous Next

Gets a description of a catalog's stored procedure parameters and result columns.

Only descriptions matching specified schema, procedure and parameter name criteria are returned. They are ordered by procedure schema and procedure name. Within this, the return value, if any, is first. Next are the parameter descriptions in call order. The column descriptions follow in column number order.

Each row in the result set is a parameter description or column description with the following fields:

PROCEDURE_CAT

String

procedure catalog (may be null)

PROCEDURE_SCHEM

String

procedure schema (may be null)

PROCEDURE_NAME

String

procedure name

COLUMN_NAME

String

column/parameter name

COLUMN_TYPE

Short

kind of column/parameter:

procedureColumnUnknown - nobody knows

procedureColumnIn - IN parameter

procedureColumnInOut - INOUT parameter

procedureColumnOut - OUT parameter

procedureColumnReturn - procedure return value

procedureColumnResult - result column in ResultSet

DATA_TYPE

short

SQL type from java.sql.Types

TYPE_NAME

String

SQL type name, for a UDT type the type name is fully qualified

PRECISION

int

precision

LENGTH

int

length in bytes of data

SCALE

short

scale

RADIX

short

radix

NULLABLE

short

can it contain NULL?

procedureNoNulls - does not allow NULL values

procedureNullable - allows NULL values

procedureNullableUnknown - nullability unknown

REMARKS

String

comment describing parameter/column

 

 
Syntax

getProcedureColumns( string catalog, string schemaPattern, string procedureNamePattern, columnNamePattern )

Parameters

catalog

The catalog that the procedure is in

schemaPattern

The schema that the procedure is in

procedureNamePattern

The name of the procedure

columnNamePattern

The name of the column or parameter

If catalog is "" (the empty string), only procedures without a catalog are returned.

If catalog is the null value, catalog names are not part of the selection criteria.

If schemaPattern is "" (the empty string), only procedures without a schema are returned.

Notes

Some databases may not return the column descriptions for a procedure. Additional columns beyond REMARKS can be defined by the database.