I have a DB column that has entries like this:
- "56/45/34"
- "78/34/145"
- "45"
- "" (i.e. NULL)
I want to search for the rows that match a certain number - for example "45" would should return the first and third rows but not the second.
We can try using a regex approach here with word boundaries:
select col
from your_table
where col ~* '\y45\y';