Need for dynamic sql - pl sql , PL-SQL Programming

Need for Dynamic SQL:

You need dynamic SQL in the situations as follows:

1) You would like to execute a SQL data definition statement (like CREATE), a data control statement (like GRANT), or a session control statement (like ALTER SESSION). In PL/SQL, these statements cannot be executed statically.

2) You wish for more flexibility. For illustration, you might desire to defer your choice of the schema objects until the run time. Or, you may want your program to construct various search conditions for the WHERE clause of a SELECT statement. A further complex program might prefer from the various SQL operations, clauses, etc.

3) You can use package like DBMS_SQL to execute the SQL statements dynamically, but you would like better performance, somewhat easier to use, or the functionality that DBMS_

SQL lacks like support for the objects and collections.

 

Posted Date: 10/6/2012 8:27:00 AM | Location : United States







Related Discussions:- Need for dynamic sql - pl sql , Assignment Help, Ask Question on Need for dynamic sql - pl sql , Get Answer, Expert's Help, Need for dynamic sql - pl sql Discussions

Write discussion on Need for dynamic sql - pl sql
Your posts are moderated
Related Questions
FETCH Statement The FETCH statement retrieve rows of data one at a time from the result set of the multi-row query. The data is stored in fields or variables which correspond t

Dynamic SQL: The Most PL/SQL programs do a predictable, specific job. For illustration, a stored procedure may accept an employee number and salary increase, and then update t

Block Structure The PL/SQL is a block-structured language. That is, the fundamental units (procedures, anonymous blocks, and functions) that make up a PL/SQL program are logi

Scope and Visibility The References to an identifier are resolved according to its visibility and scope. The scope of an identifier is that area of a program unit (subprogram, b

Nested Tables versus Index-by Tables The Index-by tables and nested tables are just similar. For e.g.  They have similar structure and their individual elements are accessed in

Main features of PL/SQL A good way to get familiar with PL/SQL is to look at a sample program. The below program processes an order for tennis rackets. At first, it declares a

Special cases of projection This section describes the identity projection, r {ALL BUT}, and the projection on no attributes, r { }, which yields TABLE_DUM when r is empty, ot

DELETE Command - SQL Loosely speaking, DELETE removes some existing rows from its target table. Suppose the university decides that course C3 is to be withdrawn. Example shows

Referencing Records Unlike the elements in a collection, that are accessed using subscripts, the fields in a record are accessed by name. To reference an individual field, you

Mutual Recursion The Subprograms are mutually recursive if they directly or indirectly call each other. In the illustration below, the Boolean functions odd & even, that dete