注:以下内容为工作积累所用,非学术派
为保证工作机密性,所用表名和列名会做加密处理
create table temp1 nologging as
select 号码,名称 from 信息表 where 1=0(条件永不成立,导出表结构时用)
select a.*,rowid from temp1 a(表别名);
create table temp1 nologging as
select /*+APPEND PARALLEL(32)+*/ distinct 唯一号 from (
select 唯一号 from 信息表 a right join (输入右表全部数据,左表搜索符合条件的记录) temp1 t on t.号码=a.号码and t.名称=a.名称
union all
select 唯一号 from 信息表 a right join temp1 t on t.号码=a.号码and t.名称=a.名称
create table temp1 nologging as
select /*+APPEND PARALLEL(32)+*/ distinct 唯一号 from 目标表 a where exists(select 1 from temp1 t where a.唯一号=t.唯一号
and a.查询子目代码='xxxxxx'
and a.查询时间=date‘xxxx-xx-xx’
select count(1) from temp1
update 目标表 a set