Win a copy of High Performance Python for Data Analytics this week in the Python forum!
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
• Campbell Ritchie
• Paul Clapham
• Ron McLeod
• Bear Bibeault
• Liutauras Vilda
Sheriffs:
• Jeanne Boyarsky
• Tim Cooke
• Junilu Lacar
Saloon Keepers:
• Tim Moores
• Tim Holloway
• Stephan van Hulst
• Jj Roberts
• Carey Brown
Bartenders:
• salvin francis
• Frits Walraven
• Piet Souris

# Mistake: OCP Java SE 8 Programmer II Study Guide (Sybex)

Greenhorn
Posts: 2
• Number of slices to send:
Optional 'thank-you' note:
Chapter 10. Page 509
I found that when is created the SPECIES table we use

this is equivalent to DECIMAL(5,0), so we save only Integers
Consequently when we execute

we save only 7 in the column

To save number 7.5 we at least need use DECIMAL(1,1) when create the table

author & internet detective
Posts: 40400
821
• Number of slices to send:
Optional 'thank-you' note:
Hleb,
You're right! I never tried to use the number of acres so hadn't noticed that. Thanks for pointing it out!

I've updated this on our online version of how to load the database.

ps - welcome to CodeRanch!

Greenhorn
Posts: 4
• Number of slices to send:
Optional 'thank-you' note:
To post a 2-digit decimal number, including one left-of-decimal and one right-of-decimal, you would need to say DECIMAL(2,1), denoting 2 total digits and 1 digit after the decimal point.

Joel Fuhrmann

Hleb Bandarenka
Greenhorn
Posts: 2
• Number of slices to send:
Optional 'thank-you' note:
You absolutely right
Now (with DECIMAL(1,1)) we can save only 0.0
But with DECIMAL(2,1) - we can save value from -9.9 to 9.9

Jeanne Boyarsky
author & internet detective
Posts: 40400
821
• Number of slices to send:
Optional 'thank-you' note:
Hleb,
Well it could be a very small zoo . But you are right that DECIMAL(4,1) is probably more appropriate.

 No thanks. We have all the government we need. This tiny ad would like you to leave now: Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton