Give an example of any procedure.
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / sharath
CREATE OR REPLACE PROCEDURE pro_name
AS --We cna write AS/IS
BEGIN
DBMS_OUTPUT.PUT_LINE(’Hello World’);
END;
| Is This Answer Correct ? | 2 Yes | 0 No |
We can write a procedure with or w/o using parameters.
For procedure the simplest ex. could be like as
SQL> create or replace procedure tr ---calling procedure
2 as
3 begin
4 in_emp; -- Called procedure
5 end;
6 /
in this procedure i am calling another procedure inside
that.
| Is This Answer Correct ? | 3 Yes | 3 No |
Answer / deepa
SQL> BEGIN
2 DBMS_OUTPUT.PUT_LINE(’Hello World’);
3 END;
4 /
| Is This Answer Correct ? | 1 Yes | 8 No |
What is a variable in sql?
What is the difference between a procedure and a function?
How to fetch records from a partitioned table?
Can we use insert statement in function?
What does partition by mean in sql?
how to create user in sql and how to set password for that?
Explain exception handling in pl/sql?
What is sql injection vulnerability?
What is a procedure in pl sql?
What is CYCLE/NO CYCLE in a Sequence?
List the various privileges that a user can grant to another user?
how can create data base link for tow servers (scott schema) give examples plz
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)