- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is the difference between MySQL stored procedure and function?
Stored Procedure
In MySQL, a stored procedure can be called with the help of call statement. A stored procedure returns more than one value.
A stored procedure returns 0 by default. It cannot be used in SQL query and is based on precompile.
Function
A function can be called inside the statement. It can return a value with the help of return statement and it returns only one value.
A function returns any single value, which can be a table. It can be used in SQL query and isn’t based on precompile.
Advertisements