What are the blocks in stored procedure?

Answers were Sorted based on User's Feedback



What are the blocks in stored procedure?..

Answer / swapnareddy

Declaration Block(optional)
Begin
Executable Block
exception Block(optional)
end;

Is This Answer Correct ?    15 Yes 3 No

What are the blocks in stored procedure?..

Answer / manojbatra071

whenever we create stored procedure the syntax is:
CREATE OR REPLACE PROCEDURE proc_name
AS/IS
(declare variables inside this block)
BEGIN
perform whatever u want in stored procedure
EXCEPTION
(perform the steps if any errors occur than what to do )
END;

therefore the blocks are as/is , begin,exception and end

Is This Answer Correct ?    11 Yes 2 No

What are the blocks in stored procedure?..

Answer / pronobesh

Actually there are 3 blocks
1) Declartion Block - Starts with AS right after CREATE
PROCEDURE <Proc Name>
2) Execution Block - Starts with BEGIN and ends with END
ahere the actual execution happen.
3) Exception Block - Where we catch the procedure error.

Hope this clarifies.

Is This Answer Correct ?    3 Yes 0 No

What are the blocks in stored procedure?..

Answer / guest

Begin
--This section must contain atleast one executiable
statment.


Exception
end ;

Is This Answer Correct ?    3 Yes 2 No

What are the blocks in stored procedure?..

Answer / sachin

create /alter proc nameof procedure
as/is
beging
statment
EXCEPTION
end

Is This Answer Correct ?    0 Yes 0 No

What are the blocks in stored procedure?..

Answer / eshwer

Declaration block
Execution block
Exception block

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

what is the difference between rownum pseudo column and row_number() function? : Sql dba

0 Answers  


How many postgresql users are there, worldwide?

0 Answers  


How to write html code in pl sql?

0 Answers  


How does cross join work?

0 Answers  


What is vector point function?

0 Answers  






what is a constraint? Tell me about its various levels. : Sql dba

0 Answers  


how view used for security purposes?

3 Answers   Glam India,


- Types of triggers - View - Dcl - Procedures, packages, functions - Metasolve - Can use Dcl in triggers - package case study - Cursor and its types - triggers schedule - Wrap - Why we are using fetch and for in cursor. difference?

0 Answers   CTS,


consider a table which contain 4 columns,ename,eno,sal and deptno, from this table i want to know ename who having maximum salary in deptno 10 and 20.

24 Answers   Mind Tree,


How to run pl sql program in mysql?

0 Answers  


What is view? Can we update view

0 Answers  


What are the benefits of triggers?

0 Answers  


Categories