Home > Ask the Oracle Experts > (Archive) Database Administration and Development Questions & Answers > Using dynamic SQL
Ask The Oracle Expert: Questions & Answers
EMAIL THIS

Using dynamic SQL

Karen Morton EXPERT RESPONSE FROM: Karen Morton

Pose a Question
Other Oracle Categories
Meet all Oracle Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 09 December 2002
How do you use dynamic SQL, and what is a typical use of dynamic SQL? Also, what are the steps you use and how is DBMS parse used? A clear example would be very helpful. Thanking you in advance.

>
EXPERT RESPONSE

With dynamic SQL, we have SQL that is not known until run time. The PLSQL engine does not know how many columns might be fetched, what tables will be accessed, what inputs are expected. You, the programmer, must do more work to deal with this.

You can use the DBMS_SQL package to run dynamic SQL or you can use EXECUTE IMMEDIATE. EXECUTE IMMEDIATE is a bit easier to code and a more recent implementation of what we used to use DBMS_SQL alone to do.

There's a good example that Oracle provides on its OTN site (technet.oracle.com) at the following link: http://technet.oracle.com/sample_code/tech/pl_sql/htdocs/ndsdemo.txt

For More Information


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


RELATED CONTENT
(Archive) Database Administration and Development
Preparing for 11i Supply Chain Management purchase
Tips for making the move to E-Business Suite on Linux
Considering Oracle Apps on Linux
Implement E-Business Suite now or later?
Configuring Oracle Payables for easy setup of valid account codes
Approving multiple invoices in Oracle AP
Migrating from 9i to 8i: Is it possible?
Factors to consider when creating a new database
Inserting Access flat file into 9i table
Forcing a value's case

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



Oracle White Papers: Fusion Middleware
HomeNewsTopicsTipsAsk the ExpertsMultimediaWhite PapersProductsBlogs
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2003 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts