Sample Header Ad - 728x90

Pattern matching with LIKE, SIMILAR TO or regular expressions

149 votes
8 answers
246895 views
I had to write a simple query where I go looking for people's name that start with a B or a D: SELECT s.name FROM spelers s WHERE s.name LIKE 'B%' OR s.name LIKE 'D%' ORDER BY 1 I was wondering if there is a way to rewrite this to become more performant. So I can avoid or and / or like?
Asked by Lucas Kauffman (1835 rep)
Jan 15, 2012, 11:24 AM
Last activity: May 20, 2025, 01:30 AM