Empty string variable matching to LIKE conditions in SQL

▼魔方 西西 提交于 2019-12-02 05:20:17
Ron Ballard

My guess is that you have some control character(s) in the string. If the first character is a newline, for example, that may cause the rest not to be displayed.

Try

select item_id, unicode(content) 
from objects
where item_id = 100;

This will show the unicode code point for the first character you can see the second character with:

unicode(substring(item, 2, 1))

and so on.

I think, you should trim the column;

select itemid, LTRIM(RTRIM(content))
from objects
where itemid = 100 and content like '%remove%'
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!