Results 1 to 5 of 5

Thread: NUMBER field

  1. #1
    Join Date
    Sep 2015
    Posts
    3

    Question Unanswered: NUMBER field

    Hi, currently I'm testing our database, I came across on one of our fields that stating "NUMBER(28,12) NOT NULL", correct me if I'm wrong because my understanding of the that field is accepting ONLY Numbers that having a limit of 28 whole numbers and 12 decimal places. Is it right? After that I try to test manually the field itself but I found out that the field only accepting 10 Numbers and displaying only 2 decimal places.

    I hope someone can help me to understand this and explain to me the whole statement for that field (NUMBER(28,12) NOT NULL)

    Thanks!

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    I'm going to assume you mean NUMERIC(28,12)

    The first number, 28, indicates the total number of digits.
    The second number, 12, indicates the number of these digits that are after the decimal point.

    e.g. 1234567890123456.123456789012

    Manual: https://dev.mysql.com/doc/refman/5.0...int-types.html
    George
    Home | Blog

  3. #3
    Join Date
    Sep 2015
    Posts
    3
    Quote Originally Posted by gvee View Post
    I'm going to assume you mean NUMERIC(28,12)

    The first number, 28, indicates the total number of digits.
    The second number, 12, indicates the number of these digits that are after the decimal point.

    e.g. 1234567890123456.123456789012

    Manual: https://dev.mysql.com/doc/refman/5.0...int-types.html

    Thanks! but in our ERD it was stated as NUMBER but anyways I got your point and my first assumption was correct.

    What bothers me is that when I test the field it only accepts 10 digits, is this normal? I assume that the design of the text field that I'm putting the numbers only accept upto 10, it's that right?

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    If your ERD says number (28,12)....
    ...then what the actual column definition IS when that erd is when implemented in MySQL

    See https://www.google.co.uk/search?q=fi...ition+in+MySQL
    I'd rather be riding on the Tiger 800 or the Norton

  5. #5
    Join Date
    Sep 2015
    Posts
    3
    Quote Originally Posted by healdem View Post
    If your ERD says number (28,12)....
    ...then what the actual column definition IS when that erd is when implemented in MySQL

    See https://www.google.co.uk/search?q=fi...ition+in+MySQL
    Is it possible that the text field size is different in our ERD? by the way thanks for replying it really clears something, I hope I was able to ask questions that is clear.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •