incorrect char() string for bigint column
Posted by: Anthony Linnett
Date: August 07, 2011 06:58PM

I am confused with the results of select char() from a bigint column.

I would expect the char() string of 130333868145 to return 001E58810071, however it returns 0058EFBFBD0071.

Could someone please explain? Please see example to replicate.


USE wlanmobile;
CREATE TABLE IF NOT EXISTS TESTBICHAR(
BI BIGINT(20) UNSIGNED NOT NULL,
PRIMARY KEY (BI)
)
ENGINE = MYISAM;

INSERT INTO TESTBICHAR (BI) VALUES (130333868145);

SELECT BI
, char(BI)
FROM
TESTBICHAR;




SELECT VERSION(); returns 5.1.49-1ubuntu8.1



Edited 2 time(s). Last edit at 08/07/2011 07:05PM by Anthony Linnett.

Options: ReplyQuote


Subject
Views
Written By
Posted
incorrect char() string for bigint column
1264
August 07, 2011 06:58PM


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.