At 01:54 PM 11/3/2004, you wrote: >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 > > > > Bigint fixed it, thanks. Any idea why the DB allows an INT(13)?
I would never imagine that INT(13) is a 13 digit number. I would assume that INT(13) is a 13 BIT number. So it would have a limit of 8192. Why allow a INT(13)? So you can allow an INT(1). If you have True/false, why not use just one bit for it? Anders +===========================================================+ |Anders Green Email: [EMAIL PROTECTED] | | Home: 919.303.0218 | | Off Road Rally Racing Team: http://LinaRacing.com/ | +===========================================================+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Protect your mail server with built in anti-virus protection. It's not only good for you, it's good for everybody. http://www.houseoffusion.com/banners/view.cfm?bannerid=39 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183312 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