您的位置:首页 > 数据库 > Oracle

oracle 生成id +创建表并插入数据

2017-11-01 13:52 381 查看
00sys_guid()生成32位id :例如酱紫 DFF8F2B4CEFE4FADBC4A776E5A3698DD
select sys_guid() from dual;

select '4028815f56d5a'||lower(substr(sys_guid(),0,19)) s_bh,q.* from QX_FUNCTION q where s_fbh='4028815f56d5a3640156d5b6c02d000c'

00创建表并插入数据
create table test2 as  select '4028815f56d5a'||lower(substr(sys_guid(),0,19)) s_bh,t1.s_mc,t1.s_lx,t1.s_url,'4028818c5f573e79015f57408d730002' s_fbh, t1.s_icon,t1.s_xh,t1.s_ms,t1.s_zt,t1.s_xtid from QX_FUNCTION t1  where s_fbh='4028815f56d5a3640156d5b6c02d000c' ;

00insert into select
insert into QX_FUNCTION  select * from test2;

select deptno,sum(sal) from emp where DEPTNO>=20 group by rollup(deptno) ;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  oracle insert-int uuid