The SMALLMONEY data type holds monetary or currency values.
SMALLMONEY accepts values from -214,748.3648 to 214,748.3647.
A period is used to separate partial from whole monetary units like cents.
A table with a SMALLMONEY column.
CREATE TABLE DemoTable
(
Id INT IDENTITY,
EmployeeName VARCHAR(100),
Salary SMALLMONEY
);
GO
INSERT INTO DemoTable VALUES ('Harold Smith', 2150.77);
INSERT INTO DemoTable VALUES ('Robert Johnson', 880);
INSERT INTO DemoTable VALUES ('Janice Lopez', 1975.50);
INSERT INTO DemoTable VALUES ('Kelly Wilson', 1098.794);
INSERT INTO DemoTable VALUES ('Grace Taylor', NULL);
GO
SELECT * FROM DemoTable;
GO
DROP TABLE DemoTable;
GO
| Id | EmployeeName | Salary |
|---|---|---|
| 1 | Harold Smith | 2150.77 |
| 2 | Robert Johnson | 880 |
| 3 | Janice Lopez | 1975.50 |
| 4 | Kelly Wilson | 1098.794 |
| 5 | Grace Taylor | NULL |
SMALLMONEY and MONEY.
CREATE TABLE DemoTable
(
MySmallMoney SMALLMONEY,
MyMoney MONEY
);
GO
INSERT INTO DemoTable VALUES (214748.3647, 922337203685477.5807);
GO
SELECT * FROM DemoTable;
GO
DROP TABLE DemoTable;
GO
| MySmallMoney | MyMoney |
|---|---|
| 214748.3647 | 922337203685477.5807 |