Oracle9i Supplied PL/SQL Packages and Types Reference Release 1 (9.0.1) Part Number A89852-02 |
|
DBMS_SQL , 3 of 20
This procedure parses the given statement in the given cursor. All statements are parsed immediately. In addition, DDL statements are run immediately when parsed.
There are two versions of the PARSE
procedure: one uses a VARCHAR2
statement as an argument, and the other uses a VARCHAR2S
(table of VARCHAR2
) as an argument.
The size limit for parsing SQL statements with the syntax above is 32KB.
DBMS_SQL.PARSE ( c IN INTEGER, statement IN VARCHAR2, language_flag IN INTEGER);
The PARSE
procedure also supports the following syntax for large SQL statements:
DBMS_SQL.PARSE ( c IN INTEGER, statement IN VARCHAR2S, lb IN INTEGER, ub IN INTEGER, lfflg IN BOOLEAN, language_flag IN INTEGER);
To parse SQL statements larger than 32 KB, DBMS_SQL
makes use of PL/SQL tables to pass a table of strings to the PARSE
procedure. These strings are concatenated and then passed on to the Oracle server.
You can declare a local variable as the VARCHAR2S
table-item type, and then use the PARSE
procedure to parse a large SQL statement as VARCHAR2S
.
The definition of the VARCHAR2S
datatype is:
TYPE varchar2s IS TABLE OF VARCHAR2(256) INDEX BY BINARY_INTEGER;
If you create a type/procedure/function/package usingDBMS_SQL
that has compilation warnings, anORA-24344
exception is raised, and the procedure is still created.
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|