1.

What is difference between function and procedure in MySQL?

Answer»
FUNCTIONProcedure
The function RETURNS the single value which is anyhow mandatory.The procedure returns zero or N values.
They only work with a STATEMENT: SelectThey can work with multiple statements: Insert, Update, Delete, Select.
In function, transactions are not possibleIn the procedure, transactions are possible
Error handling is not possibleWith try-catch, error handling is possible.
Also Read: RDBMS INTERVIEW questions


Discussion

No Comment Found