SELECT * from a where InStr (A, B) >0;
To implement a B field that is part of a field, discuss the order or the character that you want to be adjacent.
If you want characters that are either sequential or not contiguous, the definition function can be implemented:
SELECT * from a where InStr (A, B) >0;
This can only be achieved when the B field is a part of the A field. If you want a character that is either sequential or not contiguous, the defined function can implement
Create or Replace functionChecks (v_avarchar2, V_bvarchar) return Number asNum Number; Cou Number; beginNum:= -1; Cou:=0; forIinch 1.. Length (V_b) loopifInStr (V_a,substr (V_b,i,1))>0 Thencou:=Cou+1; End if; EndLoop; ifCou=Length (V_b) Then returncou; End if; Dbms_output.put_line (Cou||' '||Length (v_b)); returnnum; End; results: SQL> Select * fromA; A B---------- ----------asdf SD asdf ad asdf df asdf asdf SQL> Select * fromAwhereChecks (A, B)>0; A B---------- ----------asdf SD asdf ad asdf df asdf asdf
Oracle determines whether a string contains another string