日本免费高清视频-国产福利视频导航-黄色在线播放国产-天天操天天操天天操天天操|www.shdianci.com

學(xué)無(wú)先后,達(dá)者為師

網(wǎng)站首頁(yè) 編程語(yǔ)言 正文

oracle自動(dòng)生成uuid的實(shí)現(xiàn)方法_oracle

作者:hello_StayWithMe ? 更新時(shí)間: 2022-12-08 編程語(yǔ)言

oracle自動(dòng)生成uuid方法

1.創(chuàng)建一個(gè)表

create table t_user(id varchar2(200),name varchar2(200));

2.生成uuid的語(yǔ)句

alter table t_user modify id default sys_guid();
update t_user set id = sys_guid();

3.添加幾條數(shù)據(jù),查詢(xún)就可以看到效果

insert into t_user(name) values(pluto);

insert into t_user(name) values(charon);

commit;

select * from t_user;

oracle獲取UUID亂碼

SELECT sys_guid(),rawtohex(sys_guid()) from dual;

使用sys_guid()獲取oracleUUID,會(huì)出現(xiàn)亂碼問(wèn)題,使用庫(kù)函數(shù)對(duì)sys_guid()進(jìn)行處理,則是標(biāo)準(zhǔn)UUID

原文鏈接:https://blog.csdn.net/xx571059511/article/details/90440441

欄目分類(lèi)
最近更新