DELIMITER $ #定義$爲結束符TRUNCATE gt_hotel$ #清空table oCREATE TRIGGER tr_aft_insert_hotelAFTER INSERT ON gt_hotelFOR EACH ROWBEGININSERT INTO gt_template(source_id,source_type) VALUES (new.id,1);END$table