SQL2018. 6. 7. 17:02MySQL, MariaDB에서 CREATE FUNCTION 할 수 없음

ID를 생성하는 SQL문을 실행 CREATE DEFINER=`test`@`%` FUNCTION `GET_CREATE_ID`( `tableName` VARCHAR(50) ) RETURNS char(6) CHARSET utf8 LANGUAGE SQL NOT DETERMINISTIC CONTAINS SQL SQL SECURITY DEFINER COMMENT 'ID 생성 함수' BEGIN DECLARE id VARCHAR(50); UPDATE T_ID_GENERATION SET NEXT_ID = NEXT_ID + 1 WHERE TABLE_NAME = tableName; SET id = ( SELECT CONCAT(IFNULL(PREFIX,''), LPAD(NEXT_ID,(BLOCK_SIZE - LENGTH(IF..

image