这个问题一般是在SQL Server中使用【+】运算符连接常量字符串和变量字符串的场景下出现。

解决的方法就是使用内置的concat()函数来进行字符串连接操作。

比如将:

select * from yanggb where name like '%' + :name

替换为:

select * from yanggb where name like concat('%', :name)

这样就解决了报错问题。

 

"i will grow up alone."

相关文章:

  • 2022-12-23
  • 2021-08-02
  • 2022-12-23
  • 2022-12-23
  • 2021-10-14
  • 2021-05-13
  • 2021-12-17
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-18
  • 2022-12-23
  • 2021-10-01
相关资源
相似解决方案