Liron Harel
Liron Harel

Reputation: 11247

Decimal value wrong on insert - MySQL

When I insert a value of 10 or 10.0 to a decimal(10.0) column I get 9.9999999... - is there any way to get a 10 when inserting it?

Using entity framework, .NET 4.5, MySQL > 5

Table definition: decimal(10,9)

Upvotes: 1

Views: 384

Answers (1)

Stepo
Stepo

Reputation: 1056

I've posted link with expalation.

You can use double instead of decimal.

Upvotes: 1

Related Questions