In MySQL database context, what is the difference among these 3 terms:
- stored procedure;
- stored routine;
- stored function.
P.S. Build-in functions like those date time functions, weekday()
are considered as what?
In MySQL database context, what is the difference among these 3 terms:
P.S. Build-in functions like those date time functions, weekday()
are considered as what?
PROCEDURES VS FUNCTIONS
Difference between MySQL function and mysql procedure
MYSQL Function
MYSQL Procedure
Function must return a value but in Stored Procedure it is optional( Procedure can return zero or n values). Functions can have only input parameters for it whereas Procedures can have input/output parameters . Functions can be called from Procedure whereas Procedures cannot be called from Function.
Here I have tried to summarize the difference between function and procedures.
Google is your friend. The first match for "mysql routine function procedure" is this: http://dev.mysql.com/doc/refman/5.0/en/stored-routines-syntax.html
A quick summary: