在SQLServer中使用该sql语句可以生成GUID:select cast(NEWID() as varchar(36)) as uuid

通过一下语句将GUID中的'-'字符去掉:

select SUBSTRING(uuid,1,8)+SUBSTRING(uuid,10,4)+SUBSTRING(uuid,15,4)+

SUBSTRING(uuid,20,4)+SUBSTRING(uuid,25,12) from (select cast(NEWID() as varchar(36)) as uuid ) s

 

在oracle中使用select sys_guid() from dual;可以获得guid。

相关文章:

  • 2021-06-05
  • 2022-12-23
  • 2022-12-23
  • 2022-02-23
  • 2021-05-16
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-09-17
  • 2022-12-23
  • 2021-06-30
  • 2021-12-18
  • 2022-12-23
相关资源
相似解决方案