How to select all rows from column including two specific numbers within a set of digits, but not in beginning or end? I'm attempting to retrieve all rows that include two specific characters within a set of characters corresponding to the attributable column of data. However, the specified characters can't be included within the beginning or the end of that series of characters. 

My attempt currently displays the specified characters but includes beginning and ending characters. However I only want to display those characters contained in between the sequence.

I tried this query: 

SELECT table_id,
       table_number
FROM TABLE
WHERE table_number LIKE '%99%';
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