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 out parameter used for eventhough return statement can also be used in pl/sql?
The in operator may be used if you know the exact value you want to return for at least one of the columns.
when MSQL8.0 is in market
What is trigger explain it?
What is a system versioned table?
What is assignment operator in pl sql?
Does sql use python?
What type of database is cloud sql?
which types of join is used in sql widely? : Sql dba
What is normalisation and its types?
Which constraints we can use while creating database in sql?
what are the nonstandard string types? : Sql dba
How do you take the union of two tables in sql?
Why do we need unique key in a table?
i have 2 table table one 4 columns respective values a1 7,a2 6,a3 8 ,a4 12 & table two 4 colums respective values a1 7,a2 6,a3 8,a4 15.if table one & table two 3 colums same then 4th column values 1)Qes diff >5 then print 5 * diff value 2)Que diff <5 print 5