Well, that's before Rob Sheldon explained it all so clearly for us.
You can also use the SQL cursor number to obtain information about the SQL statement that you are executing.
You must use the CREATE OR REPLACE TYPE vc_array IS TABLE OF VARCHAR2(200); / CREATE OR REPLACE TYPE numlist IS TABLE OF NUMBER; / CREATE OR REPLACE PROCEDURE do_query_1 ( placeholder vc_array, bindvars vc_array, sql_stmt VARCHAR2 ) IS TYPE curtype IS REF CURSOR; src_cur curtype; curid NUMBER; bindnames vc_array; empnos numlist; depts numlist; ret NUMBER; isopen BOOLEAN; BEGIN CREATE OR REPLACE PROCEDURE do_query_2 (sql_stmt VARCHAR2) IS TYPE curtype IS REF CURSOR; src_cur curtype; curid NUMBER; desctab DBMS_SQL.
Note that for the remainder of this article, we will refer to the Cross-Session PL/SQL Function Result Cache as the "Function Result Cache".
The principle behind PL/SQL function result caching is simple.
is a programming methodology for generating and executing SQL statements at run time.
It is useful when writing general-purpose and flexible programs like ad hoc query systems, when writing programs that must execute DDL statements, or when you do not know at compilation time the full text of a SQL statement or the number or data types of its input and output variables.
SQL Server supports two types of CTEs-recursive and nonrecursive.
In this article, I explain how to create both types.
For the most marginal gains, there is subprogram inlining which removes the overhead of function calls by re-organising the source code during compilation.