在数据库中,我有类似于"something (something_else)“的东西,当你用"something something_else”(所以没有"()“字符)查询数据库时,是否可以使用" like”查询并得到前述结果。
发布于 2016-10-08 07:58:34
您可以在条件和字段上使用replace来删除字符。类似于:
SELECT * FROM table
WHERE REPLACE(REPLACE(field, '(', ''), ')', '')
LIKE REPLACE(REPLACE('something something_else', '(', ''), ')', '')
https://stackoverflow.com/questions/39927250
复制相似问题