1、安装uuid扩展 CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; 2、更新库表uuid update tablename set uuid= uuid_generate_v4(); update tablename SET uuid =REPLACE(uuid,'-',''); 上面语句分开执行,否则全部数据都是一样的uuid