Home » SQL & PL/SQL » SQL & PL/SQL » How does DBMS_SQL differ from Native Dynamic Code
How does DBMS_SQL differ from Native Dynamic Code [message #563460] Mon, 13 August 2012 23:34 Go to next message
Jana.A
Messages: 8
Registered: August 2012
Location: Coimbatore
Junior Member
Hi,

Let me the difference between the DBMS_SQL and Execute immediate .
*) Which one is faster ?
*) Where to use DBMS_SQL and Execute immediate (correct usage of both)?
Please help me regarding this.

Thanks,
Jana
Re: How does DBMS_SQL differ from Native Dynamic Code [message #563463 is a reply to message #563460] Tue, 14 August 2012 01:17 Go to previous messageGo to next message
flyboy
Messages: 1750
Registered: November 2006
Senior Member
Hi,

fortunately, answer to your questions is written in Oracle documentation, which is available e.g. online on http://tahiti.oracle.com/

For 11gR2, you may be interested in these chapters:
EXECUTE IMMEDIATE: http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/dynamic.htm#CACDDACH
DBMS_SQL: http://docs.oracle.com/cd/E11882_01/appdev.112/e25788/d_sql.htm#BABEDAHF

Just one recommendation: use dynamic SQL only when the task cannot be achieved by static SQL, as it (static SQL) is most performant.
Re: How does DBMS_SQL differ from Native Dynamic Code [message #563468 is a reply to message #563463] Tue, 14 August 2012 01:47 Go to previous messageGo to next message
Michel Cadot
Messages: 57603
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
... and safe.

Regards
Michel
Re: How does DBMS_SQL differ from Native Dynamic Code [message #563617 is a reply to message #563468] Wed, 15 August 2012 23:40 Go to previous messageGo to next message
Jana.A
Messages: 8
Registered: August 2012
Location: Coimbatore
Junior Member
Thanks for your response .
Please provide me some more documents regarding PL\SQL .




Re: How does DBMS_SQL differ from Native Dynamic Code [message #563618 is a reply to message #563617] Thu, 16 August 2012 00:47 Go to previous message
Michel Cadot
Messages: 57603
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
PL/SQL User's Guide and Reference
Application Developer's Guide - Fundamentals

Regards
Michel
Previous Topic: sum of a column got from joining multiple tables
Next Topic: In oracle Httpuritype - Not getting the output correctly
Goto Forum:
  


Current Time: Wed Apr 16 17:23:47 CDT 2014

Total time taken to generate the page: 0.15479 seconds