ThoseKind - 4 months ago 7

SQL Question

When running a set of insert statements in MySQL I keep getting

`Error Code: 1264. Out of range value for column 'x' at row 1`

`float(10, 10)`

`23.912 to 26.458`

Answer

`float(10,10)`

means store 10 decimal places, with no space left for the integer component.

`0.1234567890`

would be valid, because that's 10 decimal places, but `1.234567890`

isn't, because you didn't leave any space for the `1.`

It's `float(total digits, decimal places)`

, and is a sum, not `integer places, decimal places`

.

```
123.456789 = 9 digits total, 6 for decimals -> float(9, 6)
```