Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Hi, Can anybody please explain me the flow of the below query. I am not able to understand how this query works. This query is for finding the Nth highest salary.. SELECT DISTINCT (a.sal) FROM EMP A WHERE &N = (SELECT COUNT (DISTINCT (b.sal)) FROM EMP B WHERE a.sal<=b.sal); If N = 2 then second highest salary will be the o/p. If N = 3 then third highest salary will be the o/p. and so on.. Thanks, Nitin

5 Answers   Deloitte, Ness Technologies,


Dear All, Question for this Week Find out possible error(s) (either at compile time or at runtime) in the following PL/SQL block. State the reason(s) and correct the errors. Declare Cursor C1 is select ename, sal, comm from emp; Begin For i in C1 Loop If i.comm between 299 and 999 then Dbms_output.put_line(i.Ename || ‘ ** Good Commission’); Elsif i.comm > 999 then Dbms_output.put_line(i.Empno || ‘ ** Very Good Commission’); close C1; Else Dbms_output.put_line(i.Ename || ‘ ** ’ ||nvl(i.comm,‘O’)); End if; End Loop; End;

7 Answers   Accenture,


What is your daily office routine?

0 Answers   Data Vision,


Can a primary key be a foreign key?

0 Answers  


What is dml statement?

0 Answers  


what happens when the column is set to auto increment and you reach the maximum value for that table? : Sql dba

0 Answers  


Give an example of Full Outer Join?

1 Answers   IBM,


Why do we use procedures in pl sql?

0 Answers  


What are types of exception?

0 Answers  


explain the difference between bool, tinyint and bit. : Sql dba

0 Answers  


Its possible to add more than one primary key for the table

4 Answers  


What is the maximum number of rows in sql table?

0 Answers  


Categories