Give an example of any procedure.

Answers were Sorted based on User's Feedback



Give an example of any procedure...

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

Give an example of any procedure...

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

Give an example of any procedure...

Answer / roopesh kumar

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

Give an example of any procedure...

Answer / nagendra

put_line is an example of procedure

Is This Answer Correct ?    0 Yes 3 No

Give an example of any procedure...

Answer / deepa

SQL> BEGIN
2 DBMS_OUTPUT.PUT_LINE(’Hello World’);
3 END;
4 /

Is This Answer Correct ?    1 Yes 8 No

Post New Answer

More SQL PLSQL Interview Questions

Is sql the best database?

0 Answers  


What is the size of partition table?

0 Answers  


What is tuple in sql?

0 Answers  


In a table i have columns A,B,C and i have a composite index on columns A,B if so will the following query uses index or not? SELECT sal,name FROM <table_name> WHERE A=<value> AND B=<value> AND C=<value>;

2 Answers   Mastek,


how a reference cursor works?what all adnvantages are gained with it..specify the situation?

4 Answers   TCS,






How to convert lowercase letters to uppercase and uppercase letters to lowercase in a string. (ex, AbcdEfG should convert as aBCDeFg)

3 Answers   TCS,


How do I create a memory optimized filegroup?

0 Answers  


Describe the Index, Types of index, At what situation we have used? Which one s better than others?

1 Answers   IBM, TCS,


<<labele>> declare a=10 b=20, begin some statements declare a=30 c=40 end; what is the A value in nested block?

1 Answers   ITC Infotech,


Explain about various levels of constraint.

0 Answers  


If you have to declare procedure1,procedure2 in package specification and if you have to declare procedure1,procedure2 and procedure3 in package body? is it compilation or not and execute or not? what type of error is given please

1 Answers  


How do I view a view in sql?

0 Answers  


Categories