EXEC_SQL
built-in packageThe EXEC_SQL
package enables you
to access multiple Oracle database servers on several different connections
at the same time. Connections can also be made to ODBC data sources through
the Open Client Adapter (OCA), which is supplied with Reports Builder. To access
non-Oracle data sources, you must install OCA and an appropriate ODBC driver.
The EXEC_SQL
package contains procedures and functions you can
use to execute dynamic SQL within PL/SQL procedures. Like the DBMS_SQL
package, the SQL statements are stored in character strings that are only passed
to or built by your source program at runtime. You can issue any data manipulation
language (DML) or data definition language (DDL) statement using the EXEC_SQL
package.
The EXEC_SQL
package differs from the DMBS_SQL
package
in the following ways:
Uses bind by value instead of bind by address
Must use EXEC_SQL.VARIABLE_VALUE
to retrieve the value of an OUT bind parameter
Must use EXEC_SQL.COLUMN_VALUE
after
fetching rows to retrieve the values in a result set
Does not support CHAR
, RAW
,
LONG
or ROWID
data
Does not provide a CANCEL_CURSOR
procedure or function
Does not support the array interface
Indicator variables are not required because nulls are fully supported as values of PL/SQL variables
Does not support PL/SQL tables or record types
For more information about the DBMS_SQL
package, see your Oracle
Application Developer's Guide.
EXEC_SQL
built-in package
examples
Changing the primary database connection
Copying data between two databases
EXEC_SQL
predefined exceptions
Retrieving result sets from queries or non-Oracle stored procedures
Copyright © 1984, 2005, Oracle. All rights reserved.