求两个字符串之间相同的子串,例如'abcefg'和'dxefefg',那么相同的子串有'e' 'ef' 'efg' 'f' 'fg' 'g'等字符串。 使用如下sql来实现: SELECT rs.c FROM (SELECT substr(&str2, a.lv, (b.lv-a.lv+1)) c FROM (SELECT LEVEL lv FROM dual CONNECT BY LEVEL <= length(&str2)) a, (SELECT LEVEL lv FROM dual CONNECT BY LEVEL <= length(&str2)) b WHERE a.lv <= b.lv) rs WHERE instr(&str1, rs.c) > 0; 主要是取全排列的方