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 2 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 7 No

Post New Answer



More SQL PLSQL Interview Questions

Explain the working of foreign key?

0 Answers  


What is a mutating table

5 Answers   Tech Mahindra, TCS,


What are all the different normalizations?

0 Answers  


What is the primary key?

0 Answers  


What is bulk compiling in pl/sql.?

0 Answers   MCN Solutions,






How do you determine the current isolation level? : Transact sql

0 Answers  


What is clustered, non-clustured and unique index. How many indexes can be created on a table ?

3 Answers   TCS,


what are numeric data types? : Sql dba

0 Answers  


i have a table eno dno sal 1 10 200 2 10 150 3 10 100 4 20 75 5 20 100 i want to get sal which is less than the avg sal of thri dept. eno dno sal 2 10 150 3 10 100 4 20 75

11 Answers   IBM,


What are string functions in sql?

0 Answers  


What is null in pl/sql?

0 Answers  


discuss about myisam index statistics collection. : Sql dba

0 Answers  






Categories