What are the blocks in stored procedure?
Answers were Sorted based on User's Feedback
Answer / swapnareddy
Declaration Block(optional)
Begin
Executable Block
exception Block(optional)
end;
Is This Answer Correct ? | 15 Yes | 3 No |
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 |
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 |
Answer / guest
Begin
--This section must contain atleast one executiable
statment.
Exception
end ;
Is This Answer Correct ? | 3 Yes | 2 No |
Answer / sachin
create /alter proc nameof procedure
as/is
beging
statment
EXCEPTION
end
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / eshwer
Declaration block
Execution block
Exception block
Is This Answer Correct ? | 0 Yes | 0 No |
What are the data types allowed in a table?
What is the difference between truncate and drop statements?
what are the limitations of identity column? : Transact sql
Does sql use python?
How can we store rows in PL/SQL using array?
What are the different types of constraints?
What is a subquery in sql?
What is on delete restrict?
Explain what is a database?
Can we use ddl statements in stored procedure?
How many disk partitions should I have?
What is the difference between DELETE and TRUNCATE?
15 Answers Johns Hopkins University, Tech Mahindra,