sqllite 有没有类似 sqlserver的 newid MySQL的uuid的函数啊?
需要用随机数自己生成
select hex( randomblob(4)) || '-' || hex( randomblob(2))
|| '-' || '4' || substr( hex( randomblob(2)), 2) || '-'
|| substr('AB89', 1 + (abs(random()) % 4) , 1) ||
substr(hex(randomblob(2)), 2) || '-' || hex(randomblob(6))
以上代码来自:https://www.kittell.net/code/auto-increment-auto-generate-guid/