- Procedure can return zero or n values whereas function can return one value which is mandatory.
- Procedures can have input, output parameters for it whereas functions can have only input parameters.
- Procedure allows select as well as DML statement in it whereas function allows only select statement in it.
- Functions can be called from procedure whereas procedures cannot be called from function.
- Exception can be handled by try-catch block in a procedure whereas try-catch block cannot be used in a function.
- We can go for transaction management in procedure whereas we can't go in function.
- Procedures cannot be utilized in a select statement whereas function can be embedded in a select statement.
Microsoft Dot Net Master
![Microsoft Dot Net Master](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgz5dBFLuAZ_7OVweAtjrWIvqFgpRNuPv6WUZWhw56FpdBnoW4LBxSlUeZEEtJaaG7ESg1Hdq72UEO-joX76S104zg6j8aU6CpowW9npYmA5gFVnKOjiaZDteeSVPNg4kIUO-pbwrB5RtY/s1600/dot.jpg)
Microsoft Dot Net Master
Sunday, February 17, 2013
Difference between stored procedure and function
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment