遇到一个sql server的字段是varbinary类型的,找了下更新的办法:

UPDATE TABLE SET column_varbinary = CAST('abc123' AS VARBINARY)

或者你知道二进制的:

update table set strpsi=0x020000030000040000050000060000070000080000FFFF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 where struserid='xxx'

Related Posts: MSSQL-sql server-update 更新 varbinary 字段 示例 :