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
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

Example of Shorthand for a row constraint Example: Shorthand for a row constraint ALTER TABLE EXAM_MARK ADD CONSTRAINT Mark_in_range CHECK (Mark BETWEEN 0 AND 100);

Avoid the NOT NULL Constraint In the PL/SQL, using the NOT NULL constraint incur a performance cost. Consider the illustration as shown below: PROCEDURE calc_m IS m NUMB

Using Aliases The Select-list items fetched from a cursor related with the %ROWTYPE should have simple names or, if they are expressions, should have aliases. In the example bel

Effects of NULL for Table Expression Here's an important distinction between expressions denoting tables and expressions denoting multisets of rows: a table expression cannot

Declaring Records Whenever you define a RECORD type, you may declare records of that type, as the illustration shows: DECLARE TYPE StockItem IS RECORD ( item_no INTEG

Using TRIM This process has two forms. The TRIM removes an element from the end of the collection. The TRIM(n) removes the n elements from the end of the collection. For e.g.

Methods: In normal, a method is a subprogram declared in an object type specification using the keyword MEMBER or STATIC. The method cannot have similar name as the object typ

i NEED THE QURIES TO SOME OF THE PROBLEMS USING plsql

Raise_application_error -  procedure of package DBMS_STANDARD , allows to issue an user_defined error messages by stored sub-program or database trigger.