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 does it mean to have quoted_identifier on? What are the implications of having it off? : Sql dba
How can triggers be used for the table auditing?
what is the difference between pragma exception_init and raise_application_error
1 Answers Aetins, State Street,
What is normalization sql?
Is postgresql a server?
table name :Tab fields name 1.trx_no (pk) 2.trx_date 3.account code (7 char) 4.account type (1 char) 5.amt Tab contains account code day wise debit and credit transaction , account type fiels can have 2 value D for debit and c for Credit . write a query to display the account code wise total debit and credit bal for the month of april 2004. write a query to display account code wise new amt credit for the april 2004
Which clause of an UPDATE statement allows you to affect only certain rows of a table? 1. The WHERE clause 2. The SET clause 3. The ROWS AFFECTED clause 4. The ORDER BY clause
Which is better trigger or stored procedure?
What are the commands used in sql?
what is the difference between where clause and having clause? : Sql dba
Why truncate is used in sql?
What is integrity constraints?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)