禁止修改數據庫中的某一列語句 防止userinfo 表中的name,age,tel,fax 等字段被撰改 ROPTRIGGERIFEXISTS`userinfo`; SET@OLD_SQL_MODE=@@SQL_MODE,SQL_MODE=''; DELIMITER// CREATETRIGGER`userinfo`BEFOREUPDATEON`userinfo`FOREACHROWBEGIN setnew.name=old.name; setnew.member_id=old.member_id; setnew.age=old.age; setnew.tel=old.tel; setnew.fax=old.fax; END// DELIMITER; SETSQL_MODE=@OLD_SQL_MODE; /*!40014 SET FOREIGN_KEY_CHECKS=1 */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;