I want to create 5 sql statements in one procedures which are performing diff tasks. can u provide the pl/sql PROC which can be include 5 sql statements.
You need to add more information to your question. ANY PL/SQL procedure can execute arbitrarily many independent SQL statements. Simple example:
create or replace procedure my_proc
is
begin
select sum(price) from sales;
update tax_rates set tax_percent = 0.0875 where state = 'CA';
delete from sales_history where sale_date < (sysdate() - 180);
...
end;
What are you really trying to accomplish?
Last Wiki Answer Submitted: June 29, 2009 7:14 pm by Kccrosser3,830 pts.
If you live outside the United States, by submitting your email address you consent to having your personal data transferred to and processed in the United States.
I want to create 5 sql statements in one procedures which are performing diff tasks. can u provide the pl/sql PROC which can be include 5 sql statements. — Note: one time only one sql staement should execute depends on requirement not all sql statements.
The question is still very vague. What is exactly the problem ?
Another example:
create or replace procedure my_proc (p_mode in number)
is
l_price number;
begin
if p_mode = 1 then
select sum(price) into l_price from sales;
elsif p_mode = 2 then
update tax_rates set tax_percent = 0.0875 where state = 'CA';
elsif p_mode = 3 then
delete from sales_history where sale_date < (sysdate() - 180);
...
end if;
...
end;
I want to create 5 sql statements in one procedures which are performing diff tasks. can u provide the pl/sql PROC which can be include 5 sql statements. — Note: one time only one sql staement should execute depends on requirement not all sql statements.
The question is still very vague. What is exactly the problem ?
Another example: