salix/db/routines/util/functions/midnight.sql

12 lines
213 B
MySQL
Raw Normal View History

DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`midnight`()
RETURNS datetime
DETERMINISTIC
READS SQL DATA
BEGIN
RETURN TIMESTAMP(util.VN_CURDATE(), '23:59:59');
END$$
DELIMITER ;