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

How can triggers be used for the table auditing?

0 Answers  


Like shown below i have 3 columns(Name,No,Address). The values in name column i want to modity. Requirement : Keep only once space between two words (Fname,Lname) in the Name column. For this what is the query? Please answer me. Advance Thanks. Name No Address Reference manoj kumar kumar raja vinzay kumar rajendra prasad gowri nath -- -- --

5 Answers  


How to make a copy values from one column to another in sql?

0 Answers  


Which is faster view or stored procedure?

0 Answers  


Why partition by is used in sql?

0 Answers  






What is the life of an sql statement?

0 Answers  


what are aggregate and scalar functions? : Sql dba

0 Answers  


table having two columns - entity,zone enity zone pen east pen west pen north pen south pen east pencil east pencil east pencil west I want the output as : entity east west north south pen 2 1 1 1 pencil 2 1 0 0

2 Answers  


what are the join types in tsql? : Transact sql

0 Answers  


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 does rowid help in running a query faster?

0 Answers  


What is data control language?

0 Answers  


Categories