• SQL报错:The data types text and varchar are incompatible in the add operator.
  • 发布于 2个月前
  • 822 热度
    1 评论
  • 冰魄
  • 0 粉丝 69 篇博客
  •   

我在执行如下SQL查询语句时,系统报:The data types text and varchar are incompatible in the add operator的错误提示,这是啥意思?

 update formtable_main_12 set hjjsry+=',10431'  where lcbh in (
'512021040142','512021110396','512021110397''

)

用户评论
  • 摇滚枷锁
  • 数据库的类型尽量不要使用text类型,你用cast函数进行数据类型转换试一下,类似如下:

    SELECT * FROM [Details] WHERE CAST([Content] AS [nvarchar](2000))='1';

  • 2022/5/11 14:08:00 [ 0 ] [ 0 ] 回复