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;
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;
raise Data_not_there;
end if;
when Data_not_there then
dbms_output.putline('There is no Data Available for this
month for Insertion'|| ' ' || proc);

Is This Answer Correct ?    6 Yes 1 No

Give an example of any procedure...

Answer / sharath

AS --We cna write AS/IS

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

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

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

Table 1: col1 Timestamp ---------------- 01-mar-2012 11:12:46 Table 2: col2 Timestamp -------------------- 01-mar-2012 11:12:10 01-mar-2012 11:11:23 Write a query to display a row with table2 col2 value less than tabl1 col1 value. Maximum timestamp value previous to table1 col1 value. Display a result as: Col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10

0 Answers  

in procedure how to return a value

3 Answers   Wipro,

Explain two virtual tables available at the time of database trigger execution.

0 Answers  

What is the difference between SQL Constraint and PL/SQL constraint.Pls give all the constraint name.

3 Answers   TCS,

How did you export data from database to excel file.

1 Answers   TCS,

Talk about views

10 Answers   Polaris,

declare l1 number := null; l2 number :=null; begin if l1=l2 then message('equal'); else if l1<>l2 then message('not equal'); else message('else'); end if; end if; end; What will be the output ?

7 Answers   Oracle,

what is d diff between grant,commit,rollback n savepoint

1 Answers  

What does “select count(1) from tab” result?

9 Answers   IBM,

How can we store rows in PL/SQL using array?

0 Answers   MCN Solutions,

How the execution will be done in exceptions?

2 Answers  

a procedure one in two out parameters i am waiting it in a sql query can i get the output

1 Answers