Comments - BINARY

1 year, 2 months ago Alain Bourgeois

To be more clear: it can store binary values, not only characters:

create table bintest (id binary(5));

insert into bintest(id) values (x'0000000034');

insert into bintest(id) values (x'0031000034');

insert into bintest(id) values (x'0031003400');

insert into bintest(id) values (x'34');

MariaDB [xxx]> select hex(id) from bintest;

+------------+

hex(id)

+------------+

0000000034

0031000034

0031003400

3400000000

+------------+

4 rows in set (0.001 sec)

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.