Menu

SQL Server MONEY Data Type

SQL Server MONEY stores values from -922,337,203,685,477.5808 through 922,337,203,685,477.5807, with four fractional decimal places, in 8 bytes. It stores only the numeric value; it does not record a currency symbol or currency code.

Syntax

The syntax for the MONEY data type is as follows:

MONEY

Use cases

MONEY can represent a monetary amount at a fixed scale of four decimal places, but Microsoft warns that calculations using MONEY or SMALLMONEY can incur truncation-related rounding errors. For currency arithmetic, Microsoft recommends DECIMAL with at least four fractional digits. See Microsoft’s MONEY and SMALLMONEY guidance.

Examples

The following example stores a single numeric balance. Add a currency-code column separately if the application handles multiple currencies; MONEY does not store one.

CREATE TABLE BankAccount (
    ID INT PRIMARY KEY,
    Balance MONEY NOT NULL
);

INSERT INTO BankAccount (ID, Balance)
VALUES (1, 12345.67),
       (2, 98765.43),
       (3, 45678.90);

SELECT * FROM BankAccount;

In the example above, we create a table named BankAccount with two fields, ID and Balance. The Balance field uses the MONEY data type with a precision of four decimal places. We insert three records, each containing an ID and a balance.

For currency arithmetic, use DECIMAL with an explicit scale. This example uses four fractional digits:

DECLARE @Price1 DECIMAL(19, 4) = 123.45;
DECLARE @Price2 DECIMAL(19, 4) = 67.89;

SELECT @Price1 + @Price2 AS TotalPrice;

The two values and their sum use the DECIMAL(19, 4) type, which can hold four fractional digits. Choose precision and scale to fit the application’s range and rounding rules.

Conclusion

MONEY stores values to four fractional decimal places in a wide range, but it does not record currency identity and Microsoft warns of truncation-related rounding in calculations. Prefer DECIMAL with an explicit precision and scale for currency arithmetic.