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
Controlling Autonomous Transactions The first SQL statement in an autonomous routine starts a transaction. Whenever one transaction ends, the next SQL statement starts the oth

Autonomous versus Nested Transactions Though an autonomous transaction is started by the other transaction, it is not a nested transaction for the reasons shown below: (i)

Attributes: Just similar to variable, an attribute is declared with a name and datatype. The name should be exclusive within the object type. The datatype can be any Oracle ty

I need SQL , WP SQL Expert Project Description: Expert required to modify WP SQL query. Skills required are MySQL, SQL, PHP, Wordpress

Fetching Across Commits The FOR UPDATE clauses acquire exclusive all row locks. All rows are locked when you open the cursor, and when you commit your transaction they are unl

What Is a Package? The package is a schema object that group logically related PL/SQL items, types, and subprograms. The Packages usually have 2 parts, a specification & a bo

Parameter and Keyword Description: label_name: This is an undeclared identifier which optionally labels a loop. When used, the label_name should be enclosed by double ang

Write a cursor to open an employee database and fetch the employee record whose age is greater than 45

set serveroutput on declare a number(5); b number(5); c number(5); begin a:=&a; b:=&b; c:=a/b; dbms_output.put_line(c); exception when zero_divide then d

Overloading The PL/SQL overloads the subprogram names. That is, you can use similar name for few different subprograms as long as their formal parameters differ in the number