curr-yyyymmdd-func.sql 243 B

12345678910111213
  1. DELIMITER $$
  2. CREATE DEFINER=`root`@`localhost` FUNCTION `CurrYyyymmdd`() RETURNS varchar(8) CHARSET utf8mb4
  3. SQL SECURITY INVOKER
  4. BEGIN
  5. DECLARE ret VARCHAR(8);
  6. set ret = DATE_FORMAT(CURDATE(), "%Y%m%d");
  7. RETURN ret;
  8. END$$
  9. DELIMITER ;