Oracle
从Data Ghost的blog得知,原来可以用Oracle来生成UUID,做法很简单,如下:
SQL> create table test_guid 2 as 3 select sys_guid() as guid from dual; Table created SQL> select * from test_guid; GUID -------------------------------- 417D3BB4F07440F199ED5A563EC63C73
数据类型是 raw(16) 有32个字符。
参考:Oracle数据库生成UUID;
mysql”>MySQL
通过UUID()来实现
SELECT UUID() FROM DUAL ;