create trigger idtriggerbefore insert on flow_management_copy1for each ROWBEGIN SET new.ID= CONCAT(REPLACE(unix_timestamp(current_timestamp(3)),'.',''),FLOOR (RAND() * 10000));END show triggers; drop trigger idtrigger 来源:https://www.cnblogs.com/zhuyeshen/p/11890796.html 标签 触发器