17,086
社区成员
发帖
与我相关
我的任务
分享
select max(str1) ||
max(ext_str) ||
replace(replace(to_char(wm_concat(str2) ), ',', ''), '$*||', ',') ||
')'
from (
select ' select max(''' || t1.OWNER || '.' || t1.TABLE_NAME || ''') from ' || t1.OWNER || '.' || t1.TABLE_NAME || ' where 1 = 1 and exists(' str1,
' or instr(' || t1.COLUMN_NAME || ', ' || '$*|| ''字符串''' || ') > 0' str2,
' select 1 from ' || t1.OWNER || '.' || t1.TABLE_NAME || ' where 1 = 2 ' ext_str,
t1.OWNER || '.' || t1.TABLE_NAME part_str
from all_tab_columns t1
where t1.OWNER = upper('user_name')
--and t1.TABLE_NAME = upper('table_name')
) t1
group by part_str
;