插入语句 用binary转换函数可将字符串转为二进制
insert into mytable (id, bin) values(1, binary(‘abcdef‘))
查询语句 用cast进行类型转换
select id, cast(bin as char) as bintext from mytable
2022-10-06 14:42:56
插入语句 用binary转换函数可将字符串转为二进制
insert into mytable (id, bin) values(1, binary(‘abcdef‘))
查询语句 用cast进行类型转换
select id, cast(bin as char) as bintext from mytable