How to select all rows from column including two specific numbers within a set of digits, but not in beginning or end?
You could just use %_99_% instead of %99%.


% means 0 ore more characters
_ means exactly 1 character


So %_99_% means at least 1 character before and after 99, and anything before and after.

SQL&gt; select * from t1;

C1
--------------------
1991
1199
9911

SQL&gt; select * from t1 where c1 like '%_99_%';

C1
--------------------
1991