MYSQL:
生成带横线UUID:
select UUID() 形如:abaffaca-fd55-11e5-b3d0-d2c510923c15
生成32位不带横线UUID:
select replace(UUID(),'-','') 形如:804a9aa2fd5311e5b3d0d2c510923c15
Oracle:
代码语言:javascript复制create table T_USER
(
USERID varchar2(50) default SYS_GUID() not null primary key,
USERNAME varchar2(20) not null,
USERPWD varchar2(30) not null
);
insert into T_USER (USERNAME,USERPWD) values('张三','999999');
SQLServer:
生成带横线UUID:
select newid() 形如:abaffaca-fd55-11e5-b3d0-d2c510923c15
生成32位不带横线UUID:
select replace(newid(),'-','') 形如:804a9aa2fd5311e5b3d0d2c510923c15