The decimal equivalent of SQL in .NET.

What is the SQL (MS SQL Server) Decimal equivalent in .NET ?

Should it be Double , Decimal or Float ( Single in VB.NET)?

+6
source share
3 answers

There is no exact equivalent type in .NET, since the decimal SQL type is a fixed point, while the .NET System.Decimal type is a floating-type (decimal) type.

However, System.Decimal is by far the closest match and should usually be what is used to represent the value stored in the decimal column of the SQL database.

+15
source

Use Decimal as shown in this table .

+10
source

As you can see in Technet , it is decimal

0
source

Source: https://habr.com/ru/post/898763/


All Articles