用以下语句可以像微软SQL Server那样,生成36位的GUID,且中间带杠分隔。
select substr(sys_guid(),1,8)||'-'||substr(sys_guid(),9,4)||'-'||substr(sys_guid(),13,4)||'-'||substr(sys_guid(),17,4)||'-'||substr(sys_guid(),20,12) FROM table
用以下语句可以像微软SQL Server那样,生成36位的GUID,且中间带杠分隔。
select substr(sys_guid(),1,8)||'-'||substr(sys_guid(),9,4)||'-'||substr(sys_guid(),13,4)||'-'||substr(sys_guid(),17,4)||'-'||substr(sys_guid(),20,12) FROM table