1、convert(data_type(length),data_to_be_converted,style)
参数1:希望转换成的数据类型,及长度。
参数2:被转换的数据的类型。
参数3:类型(可以没有)。
示例:1\ select convert(varchar(32),Password) from table
2\ update table set Password = convert(varbinary(512),'medicon') where UserID='adm'
1、convert(data_type(length),data_to_be_converted,style)
参数1:希望转换成的数据类型,及长度。
参数2:被转换的数据的类型。
参数3:类型(可以没有)。
示例:1\ select convert(varchar(32),Password) from table
2\ update table set Password = convert(varbinary(512),'medicon') where UserID='adm'