O
O
Optimus2016-08-10 07:44:42
MySQL
Optimus, 2016-08-10 07:44:42

How to make the correct decimal field?

The decimal(3,2) field in the database contains a maximum value of 9.99 but I would like to have a maximum value of 100.00
Am I setting the field incorrectly?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Fedorov, 2016-08-10
Pyan @marrk2

decimal(5,2) where 5 is the number of digits in the number, 2 is the number of decimal places

S
Se_555, 2016-11-15
@Se_555

Hello.
There was a problem setting the decimal options.
On localhost I choose the decimal type, the length of the value is 5.2 , and decimal(5,2) is set.
On the external server, I also choose the decimal type, the length of the value is 5.2, when saving it does not give an error, but the length of the value changes to 5.0.
What could be the problem, where to look?
Already deleted tables and created new ones, does not help.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question