SQL Money and Decimal Data Types - When to Use?
If you find this SQL tutorial useful please LIKE and SUBSCRIBE! In this video I explain some of the reasons why it's a good idea to use the MONEY data type in SQL Server, and also why DECIMAL is preferred by some database developers. Which one is 'best' is very much a personal preference, but here's what I've found out from my research: 00:00 - Introduction 00:23 - When to use MONEY 02:28 - When to use SMALLMONEY 03:05 - When not to use MONEY 04:15 - Best alternative to MONEY 05:56 - Storage allocation 06:50 - Rounding issues 07:10 - Summary If you found this video leave a LIKE and SUBSCRIBE for more coding videos. MONEY and SMALLMONEY reference: https://docs.microsoft.com/en-us/sql/t-sql/data-types/money-and-smallmoney-transact-sql A good discussion of the relative merits of the money and decimal data types: https://stackoverflow.com/questions/582797/should-you-choose-the-money-or-decimalx-y-datatypes-in-sql-server If you're working in financial application development, it's useful to have an awareness of IEEE 754 (particularly the rounding rules): https://en.wikipedia.org/wiki/IEEE_754#Roundings_to_nearest More on rounding issues: https://docs.microsoft.com/en-us/sql/t-sql/data-types/decimal-and-numeric-transact-sql Also check out my SQL Programming playlist for more tutorials: https://www.youtube.com/playlist?list=PLVQbq9wVileaQK3hur907sqqJZwgmjpoT Thumbnail photo credit: https://unsplash.com/@ninjason
Download
0 formatsNo download links available.