我正在尝试从我的数据库中获取在垂直管道分隔值中有一个数字的记录。
我有这样的查询:
SELECT * FROM level_3
WHERE
date_end = -6
AND
ccode = 'GB'
AND (
responsible LIKE '%5%' OR
accountable LIKE '%5%' OR
consulted LIKE '%5%' OR
informed LIKE '%5%'
)
结果如下:
date_end ccode responsible accountable consulted informed
-6 GB |6| |6| |8|9|15| |8|
-6 GB |6|5| |6| |8| |16|
但是它与LIKE %5%匹配 15但我只希望它匹配确切的数字。我该怎么做呢?