Home » SQL & PL/SQL » SQL & PL/SQL » How do I execute normal SQL from PL/SQL
How do I execute normal SQL from PL/SQL [message #36402] Sun, 25 November 2001 23:48 Go to next message
Justin Lane
Messages: 1
Registered: November 2001
Junior Member
How do I execute normal SQL (i.e. not PL/SQL) from PL/SQL. I want to store my SQL in the database and have it executed on the server. I assume that the best way for me to do this is to 'convert' it to PL/SQL?

----------------------------------------------------------------------
Re: How do I execute normal SQL from PL/SQL [message #36407 is a reply to message #36402] Mon, 26 November 2001 05:25 Go to previous message
sverch
Messages: 582
Registered: December 2000
Senior Member
I don't know what sql commands you want to "store",but if it is just simple dml commands you may do something like this:
CREATE OR REPLACE PROCEDURE proc_name IS
BEGIN
DELETE FROM table_name;
INSERT INTO table_name...
ALTER TABLE table_name...
etc.
END;

----------------------------------------------------------------------
Previous Topic: Re: Creating a menu driven program
Next Topic: how can I read in PL/SQL procedure values of html multiple select
Goto Forum:
  


Current Time: Sun Mar 29 22:45:01 CDT 2020