【发布时间】:2020-08-13 08:49:23
【问题描述】:
所以我有这个查询:
select 'alter index '||a.index_owner||'.'||a.index_name|| ' rebuild partition '||a.partition_name
from dba_ind_partitions a
where a.index_name in ('IDX_PI_T_BSCS_CONTRACT_HISTOR2', 'IDX_PI_T_BSCS_CONTRACT_HISTOR3', 'IDX_PI_T_BSCS_RATEPLAN_HIST_C1')
and a.status = 'UNUSABLE'
我需要遍历结果,然后 execute immediate 每个语句。
【问题讨论】:
标签: sql oracle loops plsql execute-immediate