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

  • Home
  • SEARCH
  • 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 6756059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:28:40+00:00 2026-05-26T13:28:40+00:00

I created a table in MySQL with a column of type float(2,2) and inserted

  • 0

I created a table in MySQL with a column of type float(2,2) and inserted value 10 into the same, but I found that the value stored is 0.99.

What is the reason behind this ? If we use a column of type float(m, n) in MySQL where ‘m’ and ‘n’ are integers, then what should I watch out for when storing values in this column ?

  • 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-26T13:28:41+00:00Added an answer on May 26, 2026 at 1:28 pm

    float(2,2) means “use two digits, of which two are used after the decimal point”.

    Hence, you can go from -0.99 to 0.99. You can’t insert 10 into this column, you’d need atleast two digits before the comma (so float(4,2) or float(2,0)).

    MySQL permits a nonstandard syntax: FLOAT(M,D) or REAL(M,D) or DOUBLE
    PRECISION(M,D). Here, “(M,D)” means than values can be stored with up
    to M digits in total, of which D digits may be after the decimal
    point. For example, a column defined as FLOAT(7,4) will look like
    -999.9999 when displayed. MySQL performs rounding when storing values, so if you insert 999.00009 into a FLOAT(7,4) column, the approximate
    result is 999.0001.

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

Sidebar

Related Questions

I want to create a new column in a MYSQL table that has Fn
I have an ISAm table in mySql that was created similar to this: create
In my MySQL table I've created an ID column which I'm hoping to auto-increment
I have created a test table in MySQL and would like to insert 10
I have this in a MySQL db: table Message sender_id int recipient_id int created
I created a MySQL view using UNION ALL from two tables so that I
I have a table with a column of type INT(7) and I want to
I want to add dynamic columns in a mysql table but I don't know
Out of range value for Integer column type does not truncate to it's maximum
users table: mysql> describe blog_users; +--------------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key

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.