开发者

REGEXP on thats why or that's why

开发者 https://www.devze.com 2023-02-09 20:36 出处:网络
Attempting to do a select using REGEX开发者_StackOverflow社区P to get rows where column is either thats why OR that\'s why

Attempting to do a select using REGEX开发者_StackOverflow社区P to get rows where column is either thats why OR that's why

select * from table_name where column REGEXP 'that\'?s why'

Any help appreciated!


I doubt you need a regexp here.

Try this:

SELECT * FROM table WHERE col = 'Thats why' OR col = 'That\'s why'

Or, if you looking for containing values:

SELECT * FROM table WHERE col LIKE '%Thats why%' OR col LIKE '%That\'s why%'
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号