Hexadecimal strings display error
Hello everyone,
I use the mysql in the Solaris OS 8.0. The MySQL version is 5.0.4-beta-standard-log.
When I create a table with following info:
mysql> show create table test;
+-------+---------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+-------+---------------------------------------------------------------------------------------------------------------------------+
| test | CREATE TABLE `test` (
`imsi` binary(8) NOT NULL,
`ccmnum` smallint(6) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 |
+-------+---------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
After insert some records into the table such as:
Insert into test values(0x123456789012346, 1);
Then select the table as following:
select * from test;
the select result shows as following:
+----------+--------+
| imsi | ccmnum |
+----------+--------+
| 4Vx | 1 |
+----------+--------+
1 row in set (0.00 sec)
I know in MySQL Hexadecimal strings are treated as strings by default rather than as numbers.
If I want to display the Hex strings as numbers, what should I do?
Anybody know this, please tell me.
Thanks a lot in advance.
Shirley
Subject
Views
Written By
Posted
Hexadecimal strings display error
3211
July 04, 2005 07:58PM
1827
July 05, 2005 01:06AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.