Discuss in Forum
The ‘DECLARE HANDLER’ statement is used to declare a handler. When a condition whose value matches def, MySQL will execute ghi and either continue or exit the current code block.
For the same input parameters, if the stored function returns the same result, it is called a deterministic function. Otherwise, the stored function is called not deterministic.
The automatic_sp_privileges system variable is set to zero when the automatic privilege granting is not needed and revocation should not be allowed to occur. It is a crucial system variable.
When a stored function is defined with the same name as a built in function, the function name should be qualified with the database name when it is invoked. The function ‘PI()’ is built in.
In MySQL, the stored function cannot return multiple values. Instead, multiple stored functions can be written and invoked from within a single statement however. They are different from stored procedures.