DB/mysql (2) 썸네일형 리스트형 [mysql] R stored procedure 기본형 CREATE DEFINER=`root`@`%` PROCEDURE `new procedure`(IN `idxParam` CHAR(6) # 파라메터들 , IN `page` INT UNSIGNED , IN `offset` INT UNSIGNED , OUT `total` INT UNSIGNED ) LANGUAGE SQL NOT DETERMINISTIC CONTAINS SQL SQL SECURITY DEFINER COMMENT '' BEGIN IF `offset` IS NULL THEN SET `offset` = 2; END IF; IF `page` IS NULL THEN SET `page` = 0; ELSE SET `page` = `page` * `offset`; END IF; #상세보기 IF `idxParam.. [mysql] C/U/D stored procedure 기본형 CREATE DEFINER=`root`@`%` PROCEDURE `new procedure`(IN `procTypeParam` VARCHAR(20) , IN `idxParam` INT , OUT `identity_idx` INT , OUT `error_code`INT , OUT `error_message`VARCHAR(1000) ) BEGIN DECLARE EXIT HANDLER FOR SQLEXCEPTION BEGIN GET DIAGNOSTICS CONDITION 1 @sqlstate = RETURNED_SQLSTATE, @error_code = MYSQL_ERRNO, @text = MESSAGE_TEXT; SET `error_code` = @error_code; SET `error_message` =.. 이전 1 다음