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
Recursive Subprograms The recursive subprogram is the one that calls itself. Think of a recursive call as a call to a few other subprograms that does the similar task as your

Deriving Predicates from Predicates in SQL The corresponding section in the theory book describes how predicates can be derived from predicates using (a) the logical connectiv

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

Natural Join - SQL In the absence of NATURAL JOIN Example has to be replaced by something rather more longwinded, as shown in Example. Example: Joining IS_CALLED and IS_EN

Parameter and Keyword Description:   table_reference: This keyword identifies the table or view that should be accessible when you execute the UPDATE statement, and for wh

heap sort program in pl/sql

UNION without CORRESPONDING - SQL The use of UNION without CORRESPONDING. Example is merely by omitting CORRESPONDING, but only because the operands have identical SELECT clau

PRIMARY KEY: PRIMARY KEY  indicates that the table is subject to a key constraint, in this case declaring that no two rows in the table assigned to ENROLMENT can ever have the

DELETE Statement The DELETE statement eliminates whole rows of data from the specified table or view. Syntax:

Advantages of Packages The benefits of the Packages are as shown below: Modularity The Packages encapsulate logically associated items, types, and subprograms in the