The difference between Decimal and Float SQL datatypes

November 1, 2011

What is the difference between Decimal and Float datatypes in SQL? Well you can accomplish the same with both but there are advantages to each.

First off the syntax is quite different.

Decimal(total_length, length_right_of_decimal)

So you can see with decimal you may get more precision as it will never round. If you need some major finance calculations, decimal is the preferred route.

However if extreme precision is not needed and you have varying lengths of decimals, floats certainly make it easier.

Stay in Touch!

Subscribe to our newsletter.

Solutions Architecture

browse through our blog articles

Blog Archive