日期:2014-05-18 浏览次数:20606 次
create table t_binary([key] char(10), [binarychr] char(10)) insert into [dbo].[t_binary]([key], [binarychr]) values('003', 0x1189) select [key],CONVERT(binary(10), [binarychr]) from [t_binary] /* 003 0x11202020202020202020 */ create table t_binary1([key] char(10), [binarychr] binary(2)) insert into [dbo].[t_binary1]([key], [binarychr]) values('003', 0x1189) select [key],[binarychr] from [t_binary1] /* key binarychr ---------- --------- 003 0x1189 */