I need to perform a mysql query to retrieve all records that not contains an underscore into a string.
So 12345 should be taken ; 12345_blue should be rejected.
I use the following query but it is to much time consumming (due to the use of LIKE)
select jcId from jcstktabl where jcid not like '%\_%'
I would like to replace this with a version without like clause, for performance concern.
EDIT : I know using like with a leadind joker is bad, but I don't find another way :(
Thanks a lot