如何通过查询获取表空间中包含某特定字符的所有表名称? 如何通过查询获取表空间中包含某特定字符的所有表名称?数据库为oracle,谢谢! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 dba_tables 补充下:如果你的表还包括分区表,最好加上dba_tab_partitions和dba_tab_subpartitions select * from dba_tables where tablename like and tablespce_name= 每一行都是动态sql。循环执行输出。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')) t1group by part_str; 快照问题,Oracle ,求助 关于oracle中包的使用问题 急求Oracle培训PPT文档 简单的问题 怎样用SQL语句把某个表里的字段都列出来?? 新手请教高手,怎样建一个表,数据来自另一个表呢? SQL语句问题.高手快来~!~ oracle9i几个用户的相关问题 建立快照时出错 求一存储过程,可以改变几个表的结构。是不是用alter table ?在线等待。 请教大神如何优化这段SQL,谢谢 oracle 11G 日志归档问题
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
;