you can create/alter the particular column with 'zerofill' attribute set. i.e.:

create table books (isbn bigint(16) unsigned zerofill, somemore varchar(100));

-yves

 
-----Ursprüngliche Nachricht----- 
Von: "Eben Goodman" <[EMAIL PROTECTED]>
An: <[EMAIL PROTECTED]>
Gesendet: Dienstag, 5. August 2003 15:49
Betreff: storing large integers properly


> I am storing book isbn numbers in a table.  isbn numbers are 10 digit 
> numbers and many start with 0.  The data type of the field I am storing 
> this info in is a bigint(16) unsigned.  It appears that isbns that start 
> with 0 are going in as 9 digit numbers, the 0 is being ignored or 
> stripped.  I have experienced this before with integer data types 
> ignoring leading 0s.  I'm wondering how to address this?  Should I 
> change the field to a varchar or char data type?
> 
> Any advice is appreciated,
> 
> thanks,
> Eben
> 
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]
>

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to