jfinal 插入数据时,怎么使用mysql的UUID
1个回答
推荐于2018-04-06
展开全部
update test set id = UUID();MYSQL默认值设置UUID函数实际其函数除TIMESTAMP外都 MYSQL默认值目前能数或者CURRENTTIMESTAMP
需要实现UUID默认值功能则该表INSERT触发器实现:
update test set id = UUID();
create TRIGGER test_insert
AFTER INSERT ON test
FOR each ROW
BEGIN
update test set id = UUID();
end;
般主键id都用AUTO_INCREMENTuuid()适合做主键
需要实现UUID默认值功能则该表INSERT触发器实现:
update test set id = UUID();
create TRIGGER test_insert
AFTER INSERT ON test
FOR each ROW
BEGIN
update test set id = UUID();
end;
般主键id都用AUTO_INCREMENTuuid()适合做主键
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询