mysql数据库字段 禁止更新 触发器实现

禁止更新xxx_xx表的password字段

CREATE TRIGGER xxx_xx_update(触发器名称) BEFORE UPDATE ON xxx_xx(表名)
FOR EACH ROW
BEGIN
IF OLD.password is not null THEN
SET NEW.password = OLD.password;
END IF;
END;

点赞
  1. LuckyBandit说道:
    Google Chrome Windows 10
    https://t.me/s/ef_beef
  2. ChipWhisperer说道:
    Google Chrome Windows 10
    https://t.me/s/RejtingTopKazino

发表回复

电子邮件地址不会被公开。必填项已用 * 标注