What is the difference between Stored Procedure , Function
and Package,
1. how many blocks in Package and what are they.
Answers were Sorted based on User's Feedback
Answer / scorpio.mishra
1->stored procedure can not be written as a column name but
function can be written as a column name
2->result set of stored procedure can not be used in
joining tables but table return by function can be used in
joins
| Is This Answer Correct ? | 11 Yes | 1 No |
Answer / darshan shah
SP may return value or may not ,function always treturn
value.
SP cannot use in sselect statment or in sql stattment ,We
can use Function in any where in sql statment.
Packeage is set of statment,SP,Function Which run one by
one statment in that.
| Is This Answer Correct ? | 6 Yes | 0 No |
Answer / pratap557
In general SPs are sequential block of PL/SQL for
Transaction
Func are used for specific calculation / selection
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / bunty_18
1>Stored procedure is pre-executed block of code whereas
function is not.
2>Stored procedure may return zero,one or more than one value
whereas function always return one and only one value..
3>We can use try catch block in stored procedure whereas
function doesn't support try catch block...
4>We can't use stored procedure in select statement whereas we
use function in select statement..
| Is This Answer Correct ? | 6 Yes | 3 No |
Answer / pratap557
We cannot write DML in Function whereas in SPs we can
| Is This Answer Correct ? | 0 Yes | 3 No |
What is a system database and what is a user database?
What is DCL?
How to loop through returning rows?
What is the difference between seek predicate and predicate?
Which command displays the SQL command in the SQL buffer, and then executes it?
How to create new tables with "select ... Into" statements in ms sql server?
What is the Difference Between Primary and Foreign Key?
0 Answers Accenture, Deloitte, JPMorgan Chase, Maveric,
How to update existing rows in a table?
how we can store the value like that 001,003,023 etc in sql server 2005
How to modify existing triggers using "alter trigger"?
why would you use sql agent? : Sql server database administration
How do you implement one-to-one, one-to-many and many-to- many relationships while designing tables?
4 Answers Credit Suisse, GCU, Symphony, TCS,
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)