The ALTER PROCEDURE or ALTER FUNCTION statement can be used to alter some of the characteristics of a stored routine: ALTER PROCEDURE proc_name [characteristics] ALTER FUNCTION func_name [characteristics] The allowable characteristics for these statements are SQL SECURITY and COMMENT. These have the same syntax as for the CREATE PROCEDURE and CREATE FUNCTION statements. For example, if a function currently has DEFINER security, you can change it to INVOKER security and add a comment as follows: ALTER FUNCTION f SQL SECURITY INVOKER COMMENT 'this function has invoker security'; As with the corresponding CREATE statements, the characteristics can be listed in any order if more than one is given. These statements cannot be used to alter other aspects of routine definitions, such as the parameter declarations or the body. To do that, you must drop the routine first and then create it again with the new definition. |