CREATE FUNCTION Statement There is no way to pass parameters directly to or from events; however, it is possible to invoke a stored routine with parameters within an event: If an event’s definer has privileges sufficient to set global system variables (see Section 5.1.9.1, “System Variable Privileges” ), the event can read and write global variables. As granting such privileges entails a potential for abuse, extreme care must be taken in doing so. Generally, any statements that are valid in stored routines may be used for action statements executed by events. For more information about statements permissible within stored routines, see Section 25.2.1, “Stored Routine Syntax” . You can create an event as part of a stored routine, but an event cannot be created by another event. The  CREATE FUNCTION  statement is used to create stored functions and loadable functions: 2513 13.1.15 CREATE INDEX Statement 13.1.14 CREATE FUNCTION Statement DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END; SET v = 0; WHILE v < 5 DO INSERT INTO t1 VALUES (0); UPDATE t2 SET s1 = s1 + 1; SET v = v + 1; END WHILE; END | delimiter ; CREATE EVENT e_call_myproc ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 DAY DO CALL myproc(5, 27); CREATE [UNIQUE | FULLTEXT | SPATIAL] INDEX  index_name [ index_type ] ON  tbl_name  ( key_part ,...) [ index_option ] [ algorithm_option  |  lock_option ] ... key_part : { col_name  [( length )] | ( expr )} [ASC | DESC] index_option : { KEY_BLOCK_SIZE [=]  value |  index_type | WITH PARSER  parser_name | COMMENT ’ string ’ | {VISIBLE | INVISIBLE} | ENGINE_ATTRIBUTE [=] ’ string ’ | SECONDARY_ENGINE_ATTRIBUTE [=] ’ string ’ } index_type : USING {BTREE | HASH} •For information about creating stored functions, see Section 13.1.17, “CREATE PROCEDURE and CREATE FUNCTION Statements” . •For information about creating loadable functions, see Section 13.7.4.1, “CREATE FUNCTION Statement for Loadable Functions” .