嗨,这是我的问题:-
Value
-----
ABCDE
ABCD
ABC
ABF
ABFG
结果应该是:ABCDE & ABFG
以上不是同一列中没有重复出现的任何其他字符串的子串
最佳答案
你可以这样做:
select *
from my_table t1
where not exists (
select 1 from my_table t2
where t1.value <> t2.value
and t2.value like '%' || t1.value || '%'
)
关于sql - Oracle Get Records where String not present as Sub string in other rows?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53949826/