SQL从Where子句中删除空格

use*_*331 0 sql sql-server

我有这个 where 子句:

WHERE cc.community = 'Downtown'
Run Code Online (Sandbox Code Playgroud)

但在我的数据库中没有名为“Downtown”的社区,而是“Downtown”。我的问题是我可以从 cc.community 中删除 where 子句中的空白吗 where Downtown = Downtown?

nac*_*cho 5

尝试这个:

 WHERE REPLACE(cc.community,' ','') = 'Downtown' 
Run Code Online (Sandbox Code Playgroud)