数据库生成UUID

ORACLE

function  select   sys_guid() from dual

select   sys_guid() from dual


DB2

function RAND() 

function GENERATE_UNIQUE() CHAR(13) FOR BIT DATA

SELECT concat (hex (RAND ()), hex (RAND ())) a FROM SYSIBM.SYSDUMMY1  - 32

select HEX(GENERATE_UNIQUE()) from sysibm.sysdummy1; - 26 number char


SQL server

NEWID() with separator '-'

select replace(NEWID(),'-','')AS A




你可能感兴趣的:(数据库)