摘要:
DROP EVENT IF EXISTS eve1;DELIMITER $$CREATE EVENT eve1 ON SCHEDULE EVERY 1 SECOND STARTS NOW() ENDS NOW()+1ON COMPLETION PRESERVEDISABLEDOBEGINUPDATE testtable1 SET age = age+1 WHERE id = 1;END$$DELIMITER ;SELECT * FROM testtable1;SELECT NOW();/*标准创建语句EventsEventsCREATE EVENT 事件任务名称 ON SCHEDULE AT 阅读全文
摘要:
DELIMITER $$DROP FUNCTION IF EXISTS test_fun1$$CREATE FUNCTION test_fun1 (df1 INT) RETURNS VARCHAR(20)DETERMINISTICCONTAINS SQLSQL SECURITY DEFINERCOMMENT '这是函数的描述'BEGINSET df1 = 13;INSERT INTO testtable1(NAME)VALUES('li');SELECT COUNT(*) INTO @cun FROM testtable1;RETURN @cun+"& 阅读全文