I need to copy data from one column to another after converting. There is a column of type binary(255) and another column in a same table of type varchar(255). how to migrate data from binary to varchar column after using convert function. i.e CONVERT(VARCHAR(255), ?, 2)
我需要在转换后将数据从一列复制到另一列。有一个类型为binary(255)的列和另一个列在varchar(255)类型的表中。使用convert函数后如何将数据从二进制文件迁移到varchar列。即CONVERT(VARCHAR(255),?,2)
Is there any other solution without copy data to another column? any direct change column solution ?
是否有其他解决方案没有复制数据到另一列?任何直接变更栏解决方案?
1 个解决方案
#1
0
UPDATE [Table]
SET [varchar_column] = CONVERT(VARCHAR(255), [binary_column])
-- WHERE x = y <-- If you only want to update certain records.
#1
0
UPDATE [Table]
SET [varchar_column] = CONVERT(VARCHAR(255), [binary_column])
-- WHERE x = y <-- If you only want to update certain records.