The decimal data type
The decimal
data type represents a 128-bit wide, decimal number.
Caution
Arithmetic operations involving decimal
values are significantly slower than operations on real data type.
If your use case doesn't require very high precision, we recommend using real
.
decimal
literals
To specify a decimal
literal, use one of the following syntax options:
Syntax | Description | Example |
---|---|---|
decimal( number) |
A decimal number represented by one or more digits, followed by a decimal point, and then one or more digits. | decimal(1.0) |
decimal( numbere exponent) |
A decimal number represented by scientific notation. | decimal(1e5) is equivalent to 100,000 |
decimal(null) |
Represents the null value. |
Learn more about syntax conventions.
Related content
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for