Give an example of any procedure.
Answer Posted / dev lamani
create or replace procedure Data_Ho(region number,proc
number) is
Data_Not_there exception;
cnt number;
Begin
select count(*) into cnt
from vhub.op_fertilizer_sta_tran
where proc_monyr=proc and region_code=region;
if cnt>=0 then
insert into op_fertilizer_sta
select * from op_fertilizer_sta_tran
where proc_monyr=proc and region_code=region;
else
raise Data_not_there;
end if;
exception
when Data_not_there then
dbms_output.putline('There is no Data Available for this
month for Insertion'|| ' ' || proc);
End;
Is This Answer Correct ? | 6 Yes | 1 No |
Post New Answer View All Answers
What is primary key secondary key alternate key candidate key?
How run sql*plus commands that are stored in a local file?
What does plv msg allows you to do?
How do you use collections in procedure to return the resultset?
What is cursor in pl sql?
what is a trigger in mysql? Define different types of trigger. : Sql dba
what is innodb? : Sql dba
Which constraints we can use while creating database in sql?
Does view store data in sql?
What is the example of procedure?
How do you run a query?
How do you rename a table in sql?
What is application trigger?
How show all rows in sql?
Why sql query is slow?