【mysql】批量生产UUID

问题描述:php

批量插入数据,生产的UUID须要去掉中间的“-”。mysql

注意问题:sql

当mysql字符集编码为uftmp4,查询replace(uuid(),"-","")一致ui

使用uft8mb4则不会一致编码

replace(convert(uuid() using utf8mb4), '-','')get

bug:Function UUID() and REPLACE(), can't work togetherio

参考官网:https://bugs.mysql.com/bug.php?id=12774bug

相关文章
相关标签/搜索