Oracle9i Supplied PL/SQL Packages and Types Reference Release 1 (9.0.1) Part Number A89852-02 |
|
DBMS_SQL , 15 of 20
This procedure describes the columns for a cursor opened and parsed through DBMS_SQL
.
The DBMS_SQL
package declares the DESC_REC
record type as follows:
type desc_rec is record ( col_type BINARY_INTEGER := 0, col_max_len BINARY_INTEGER := 0, col_name VARCHAR2(32) := '', col_name_len BINARY_INTEGER := 0, col_schema_name VARCHAR2(32) := '', col_schema_name_len BINARY_INTEGER := 0, col_precision BINARY_INTEGER := 0, col_scale BINARY_INTEGER := 0, col_charsetid BINARY_INTEGER := 0, col_charsetform BINARY_INTEGER := 0, col_null_ok BOOLEAN := TRUE);
Table 62-16 DESC_REC Type Parameters
The DESC_TAB
type is a PL/SQL table of DESC_REC
records:
type desc_tab is table of desc_rec index by BINARY_INTEGER;
You can declare a local variable as the PL/SQL table type DESC_TAB
, and then call the DESCRIBE_COLUMNS
procedure to fill in the table with the description of each column. All columns are described; you cannot describe a single column.
DBMS_SQL.DESCRIBE_COLUMNS ( c IN INTEGER, col_cnt OUT INTEGER, desc_t OUT DESC_TAB);
Table 62-17 DBMS_SQL.DESCRIBE_COLUMNS Procedure Parameters
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|