Job Seekers   Employers
dbapool: Authors | Submissions | Contact Us
   Forgot password? | Sign up
  Home   Discussion Forum   Articles   Interview Questions   FAQs   Scripts   Rewards   Analyzer   White Papers   Blog   Certification   Downloads   Tools
 

Topic: SQL*Plus and PL/SQL >> DDL statement in procedure

Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property. You may review the entire Oracle Certification Program Candidate Agreement online Here.



  


 Title: DDL statement in procedure
 jayesh  Posted: Jan 07, 2008 10:16:55 AM

 Total Post: 60
 Joined: Jan, 2008






 can i use DDL statement in procedure like create table or alter table.
Pls reply me in detail.

 Mohammed Taj
Posted: Jan 07, 2008 10:38:36 AM  

 Total Post: 746
 Joined: Jul, 2007






 
Yes, you can use it through "execute immediate"
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/executeimmediate_statement.htm#LNPLS01317


 pammi
Posted: Feb 29, 2008 06:02:48 AM  

 Total Post: 21
 Joined: Feb, 2008






 
Please see the following example

CREATE OR REPLACE PROCEDURE del_rows
(p_table_name IN VARCHAR2)
IS BEGIN
EXECUTE IMMEDIATE ‘drop table ‘ || p_table_name;
END;


 Vish
Posted: Jul 28, 2008 01:57:45 AM  

 Total Post: 84
 Joined: Jan, 2007






 
you can use DBMS_SQL package for it

 Time Zone: EDT

  




Forum Rules & Description


Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user




 








Get FREE Magazines

Top 10 Forum User

  Murtuja Khokhar857
  Mohammed Taj746
  positive fanatic483
  Jayanta Sur479
  Vigyan Kaushik386
  Gopu Gopi327
  Gitesh Trivedi322
  Vinoth Kumar264
  neeraj sharma258
  Ramesh Jois246






oracle Mag



  About Us Advertise Terms of Use Privacy Newsletters Contact Us    

Home   Discussion Forum   FAQs  Articles  Jobs   Newsletters  Directory  Downloads 

Our Premium Sponsor
Confio Software