+ 1

Wildcard for single characters

When you use the underscore for a comparison of string in the where statement, you only use it for a single character. I was wondering if you have this statement: WHERE name LIKE 'a_b' Will it gather data like 'ab', or do you have to have a single character between a and b for it to be true? If that's true, why?

11th Mar 2024, 3:01 AM
Colton Minard
1 Antwort
+ 6
Colton Minard in general it should pick up at 'a' and then a single character and then 'b'. It should not pick up say words like able or stable or label. The wildcard says there is a letter or number in this case for product identification as 'a1b' or 'azb' given that this is pattern matching ...
11th Mar 2024, 3:55 AM
BroFar
BroFar - avatar