Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - I used c# to save floating-point data in sqlServer, and something went wrong.
I used c# to save floating-point data in sqlServer, and something went wrong.
It's better this way. Decimal system (18,0)

18 is the fixed-point precision, and 0 is the decimal place.

Decimal system (a, b)

Specifies the maximum number of decimal places that can be stored around the specified decimal point, with a maximum precision of 38.

B specifies the maximum number of decimal places that can be stored to the right of the decimal point. The number of decimal places must be a value between 0 and a. The default number of decimal places is 0.