1. Registered User
Join Date
Sep 2015
Posts
3

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. www.gvee.co.uk
Join Date
Jan 2007
Location
UK
Posts
11,445
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

3. Registered User
Join Date
Sep 2015
Posts
3
Originally Posted by gvee
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?

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

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