CREATE TRIGGER `CHRM_OTHERORGMEMBER_AFTER_UPD_TR` AFTER UPDATE ON `CHRM_OTHERORGMEMBER`
FOR EACH ROW
BEGIN
IF NEW.IS_EXIT = 'Yes' THEN
UPDATE CHRM_EMPLOYEE_VIR_ORG SET CHRM_EMPLOYEE_VIR_ORG.QUIT = NEW.IS_EXIT,CHRM_EMPLOYEE_VIR_ORG.EXIT_DATE = NEW.EXIT_DATE
WHERE (OID = NEW.EMPLOYEE_ID) AND (OTHERORGMEMBER_ID = NEW.OTHER_ORG_MEM_ID);
END IF;
yejr
周六, 2007/01/06 - 19:54
Permalink
http://imysql.cn/docs/MySQL_
http://imysql.cn/docs/MySQL_51_zh/custom-engine.html
先看看这里的手册吧。
MySQL中文网: http://imysql.cn
Google MySQL中文用户群:http://groups.google.com/group/imysql
给你的祝福,要让你招架不住!
sxryan
周一, 2007/01/08 - 17:27
Permalink
我的是这样写的: exam
我的是这样写的:
example:
delimiter //
CREATE TRIGGER `CHRM_OTHERORGMEMBER_AFTER_UPD_TR` AFTER UPDATE ON `CHRM_OTHERORGMEMBER`
FOR EACH ROW
BEGIN
IF NEW.IS_EXIT = 'Yes' THEN
UPDATE CHRM_EMPLOYEE_VIR_ORG SET CHRM_EMPLOYEE_VIR_ORG.QUIT = NEW.IS_EXIT,CHRM_EMPLOYEE_VIR_ORG.EXIT_DATE = NEW.EXIT_DATE
WHERE (OID = NEW.EMPLOYEE_ID) AND (OTHERORGMEMBER_ID = NEW.OTHER_ORG_MEM_ID);
END IF;
END;
//
delimiter ;
你也可以用EMS SQL Manager.
yejr
周一, 2007/01/08 - 17:49
Permalink
推荐用mysql-front或者Nav
推荐用mysql-front或者Navicat,两个都很不错。
MySQL中文网: http://imysql.cn
Google MySQL中文用户群:http://groups.google.com/group/imysql
给你的祝福,要让你招架不住!