Dont work brackets in LIKE statement
I use MySQL WorkBench, I dont understand why SELECT * from user where name like'B[io]' dont work.
My DataBase:
Advertisement
Answer
Because MySQL does not support character classes in like expressions. Neither does the SQL standard.
Use regular expressions:
where name regexp '^B[io]'
Incidentally, the like does work. You just have no data that starts with the five characters 'B', '[', 'i', 'o', and ‘]' in that order.
