Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 891485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T13:53:56+00:00 2026-05-15T13:53:56+00:00

When using decimal in MySQL, does a value of (5,3) make it so the

  • 0

When using decimal in MySQL, does a value of (5,3) make it so the max number is 99.999? If not how do I specify that? My number is for currency so I need to use decimal, but it should not go over 99 and it must have 3 decimal places.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T13:53:57+00:00Added an answer on May 15, 2026 at 1:53 pm

    decimal (5,3) is the standard SQL way to define a field with a range of -99.999 .. 99.999.

    Note that with MySQL, if you attempt to insert a value that is out of range, MySQL will automatically truncate the value to the nearest boundary value (in this case, either 99.999 or -99.999) without throwing an error.

    Added

    In this case, there will be a maximum of 5 digits of data stored, with exactly 3 digits to the right of the decimal point. If you insert a number like 1.23 it will be stored as 1.230; likewise 1 will be stored as 1.000. If you insert 12.3456 it will be rounded up to 12.346; if you insert 12.0001 it will be rounded down to 12.000.

    When the column is returned to your program, the exact representation will depend upon how your database API maps a decimal data type. If it maps to an integer, you’ll lose the decimal fraction; if it maps to a floating point number (float, double), you may lose precision; if it maps to a Decimal (C#/Java) then you’ll get an exact representation, as long as your value is within the bounds of the datatype.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using a mySql DECIMAL(12,4) column to hold price values (seeing how that's
I have to validate using regex decimal number between 00.00 to 35.35 with following
I am trying to get decimal value using LINQ in a MVC3 project. How
Am using the below expression to validate a textbox with decimal number. But it
I have to convert a decimal number to octal and hexadecimal using bitwise operations.
A friend of mine said that they experienced oddities with using the decimal column
What is the reason that some people from Oracle background are using DECIMAL(31,0) for
I am building a django app that uses SQLAlchemy over MySQL. I am using
I have a MySQL query that fetches a numeric value VARCHAR (20) from a
I am storing money values on a MySQL table and I'm using DECIMAL as

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.