mysql8 添加触发器 作者: juoliii 时间: 2024-06-25 分类: 开发 ```sql CREATE TRIGGER `UPDATECODE` before INSERT ON `apply_data` FOR EACH ROW begin SET new.code = concat(DATE_FORMAT(FROM_UNIXTIME(new.createTime/1000), '%Y%m%d'),LPAD((select count(1)+1 from apply_data where uid=new.uid),5,'0')); end ``` 标签: none
评论已关闭