James Smith wrote:
>>> INSERT INTO barcodes (Barcode, ItemID) VALUES (0008811953928,17870)
>>> 
>>> Could anyone tell me why the number 0004294967295 is 
>>> causing an error 
>>>> when the SQL statement doesn't even show it being used?
>> 
>> Because it is 2^32. Instead of throwing an error MySQL just 
>> rounds your value to the maximum that fits in the field.
> 
> But the field is INT(13), why would a 13 digit number not fit?

Because display padding has got nothing to do with physical 
storage: http://dev.mysql.com/doc/mysql/en/Numeric_types.html

Jochem

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Sams Teach Yourself Regular Expressions in 10 Minutes  by Ben Forta 
http://www.houseoffusion.com/banners/view.cfm?bannerid=40

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183255
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to