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



What is the difference between Stored Procedure , Function and Package, 1. how many blocks in Pac..

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

What is the difference between Stored Procedure , Function and Package, 1. how many blocks in Pac..

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

What is the difference between Stored Procedure , Function and Package, 1. how many blocks in Pac..

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

What is the difference between Stored Procedure , Function and Package, 1. how many blocks in Pac..

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

What is the difference between Stored Procedure , Function and Package, 1. how many blocks in Pac..

Answer / pratap557

We cannot write DML in Function whereas in SPs we can

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More SQL Server Interview Questions

SYNTAX FOR VIEWS WITH EXAMPLE HOW TO LINK TWO TABLES

1 Answers   Microsoft,


Does partitioning improve performance?

0 Answers  


Can we do dml on views?

0 Answers  


What is the optimization being performed in oracle and SQL Server?

0 Answers   Cap Gemini,


How to delete duplicate records based on single column from a table?

0 Answers   Petranics Solutions,






How you provide security to cube? : sql server analysis services, ssas

0 Answers  


How to invoke a trigger on demand?

0 Answers  


how to overcome kernel isssues

0 Answers   Fortune,


Can a stored procedure call itself or recursive stored procedure? How much level sp nesting is possible?

0 Answers  


IF more than one Site is accessing the same Database server and I want to move the DB with Minimum down time? How will you do

0 Answers  


What is self join in sql server joins?

0 Answers  


How maney row would be print after join if A table have 100 rows and B table have 50 rows...

9 Answers   Hewitt,


Categories