database/mysql

[mysql] select procedure 만들기

labj 2017. 1. 20. 00:59
[mysql] select procedure 만들기

DELIMITER  $$
drop procedure if exists ebizin4.USP_Interface_Member_GetEducationCourceByButton$$

CREATE PROCEDURE USP_Interface_Member_GetEducationCourceByButton(in code int)
BEGIN
SELECT E_TRAINING_LIST_ID
 ,E_KIND_ID
 ,E_NM
 ,EX_DATE
 ,E_TIME
 ,E_PRICE
 ,E_RETURN_PRICE
 ,E_RETURN_ABLE
 ,E_COMPANY_NM
 ,ETC1
 ,ETC2
 ,REG_ID
 ,REG_DATE
  FROM e_training_list
  WHERE E_KIND_ID = code;
END$$

DELIMITER ;


CALL USP_Interface_Member_GetEducationCourceByButton(6);

[mysql] select procedure 만들기