
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Differences Between Stored Procedures and Functions
Following are the main differences between functions and procedures:
Functions | Procedures |
---|---|
A function has a return type and returns a value. | A procedure does not have a return type. But it returns values using the OUT parameters. |
You cannot use a function with Data Manipulation queries. Only Select queries are allowed in functions. | You can use DML queries such as insert, update, select etc… with procedures. |
A function does not allow output parameters | A procedure allows both input and output parameters. |
You cannot manage transactions inside a function. | You can manage transactions inside a procedure. |
You cannot call stored procedures from a function | You can call a function from a stored procedure. |
You can call a function using a select statement. | You cannot call a procedure using select statements. |
Advertisements