QuickTopic (SM) free message boards QuickTopic (SM) free message boards
Skip to Messages
  Sign In to access your topic list  |New Topic |My Topics|Profile
Upgrade to Pro   Customize, show pictures, add an intro, and more:   QuickTopic Pro...and check out QuickThreadSM
Topic: Storing fixed point numbers in MySQL
Views: 3372, Unique: 1691 
Subscribers: 1
What's
this?
Printer-Friendly Page
Subscribe to get & post, or stop messages by email Subscribe
All messages    << 9-16  8-8 of 16  1-7 >>
About these ads
Who | When
Messagessort recent-top   
Post a new message
 
kellan  8
01-03-2005 09:06 AM ET (US)
Edited by author 01-03-2005 09:07 AM
Decimal support has always been a little neglected, and this includes the documentation, but the key phrase is, "MySQL stores DECIMAL and NUMERIC values as strings..."

try: insert into example values ('1.1')

what is happening is mysql is seeing a bare 1.1 and is converting it to a float before insert

btw the reason you get '99.99999' rather then '9.9999' when inserting 1000 is because MySQL uses the signed bit for positive numbers to try to handle overflow
RSS link What's this?
All messages    << 9-16  8-8 of 16  1-7 >>
QuickTopicSM message boards
Over 200,000 topics served
Learn more Frequently asked questions  Acknowledgements
What they're saying about QuickTopic
 Questions, comments, or suggestions? Contact Us
Read our use policy before beginning. We value your privacy; please read our privacy statement.
Copyright ©1999-2008 Internicity Inc. All rights reserved.