string sql1 = "select price from dbo.eazy_farm where REPLACE(title,' ','')='" + cainame + "' and company_id='" + company_id.ToString() + "'";

replace第一个参数为数据库字段名

          第二个参数为被替换的字符

          第三个参数为需要替换成的字符

上面sql语句的意思是需要把title中的所有空格去掉然后和cainame比较

相关文章:

  • 2022-02-05
  • 2021-09-17
  • 2021-09-17
  • 2021-09-17
  • 2022-12-23
  • 2022-12-23
  • 2021-12-05
猜你喜欢
  • 2021-09-17
  • 2021-11-08
  • 2021-10-16
  • 2022-12-23
  • 2021-09-23
相关资源
相似解决方案