/**
 * qa_tag相关触发器
 * create time: 2011-5-31 下午03:33:45
 * @version $Id: db.trigger.sql 29 2011-06-01 10:47:18Z liqt $
 * @author LiQintao
 */

DELIMITER |

DROP TRIGGER IF EXISTS t_tag_delete_after |

CREATE TRIGGER t_tag_delete_after AFTER DELETE ON qa_tag
	FOR EACH ROW BEGIN
		# 删除qa_question_tag_link相关关联
		DELETE FROM qa_question_tag_link WHERE t_id = OLD.t_id;
	END
|