有两个方法1 oracle secure search,就是专门把db 建成全文索引的,可以指定所有的列都索引,定位到表的行。2 模拟上面的功能select * from ( select 't1:' || c1 || c2 || c3 || ' t1 end;' c from t1 union select 't2:' || c1 || c2 || c3 || ' t2 end;' c from t2 ) s where s like '你要找的字符串';根据结果就能判断到底是那张表了。不过如果表很大的话这个sql会很慢
from (
select 't1:' || c1 || c2 || c3 || ' t1 end;' c from t1
union
select 't2:' || c1 || c2 || c3 || ' t2 end;' c from t2
) s
where s like '你要找的字符串';根据结果就能判断到底是那张表了。不过如果表很大的话这个sql会很慢