赞
踩
1
create table t_user(id varchar2(200),name varchar2(200));
create
table
t_user(id varchar2(200),
name
varchar2(200));
2
alter table t_user modify id default sys_guid();
alter
t_user
modify
id
default
sys_guid();
update t_user set id = sys_guid();
update
set
id = sys_guid();
3
4
5
6
7
insert into t_user(name) values(pluto);
insert
into
t_user(
)
values
(pluto);
insert into t_user(name) values(charon);
(charon);
commit;
commit
;
select * from t_user;
select
*
from
t_user;
SELECT sys_guid(),rawtohex(sys_guid()) from dual;
SELECT
sys_guid(),rawtohex(sys_guid())
dual;
使用sys_guid()获取oracleUUID,会出现乱码问题,使用库函数对sys_guid()进行处理,则是标准UUID