57,062
社区成员
发帖
与我相关
我的任务
分享
DECLARE total int;
DECLARE tp int;
DECLARE nian int;
DECLARE i int;
DECLARE ff int;
DECLARE seasion int;
DECLARE half int;
DECLARE sfc timestamp;
DECLARE efc timestamp;
DECLARE dend timestamp;
SELECT period_diff(DATE_FORMAT(contectend,'%Y%m'),DATE_FORMAT(jfstdate,'%Y%m')) into total ,pricetype into tp ,fftype into ff,jfstdate into sfcfrom jz_contect where ctid = new.ctid;
DECLARE efc timestamp;
DECLARE dend timestamp;
SELECT period_diff(DATE_FORMAT(contectend,'%Y%m'),DATE_FORMAT(jfstdate,'%Y%m')) into total from jz_contect where ctid = new.ctid;
SELECT pricetype into tp from jz_contect where ctid = new.ctid;
SELECT fftype into ff from jz_contect where ctid = new.ctid;
SELECT jfstdate into sfc from jz_contect where ctid = new.ctid;
CREATE
/*!50017 DEFINER = 'root'@'localhost' */
TRIGGER `trigger_jz_guestcard` AFTER INSERT ON `jz_contect`
SELECT period_diff(DATE_FORMAT(contectend,'%Y%m'),DATE_FORMAT(jfstdate,'%Y%m')) into total from jz_contect where ctid = new.ctid;