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

     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) ;  

没有更多推荐了,返回首页