Which sql server data type best represents a doubl

2019-01-21 00:08发布

问题:

This question already has an answer here:

  • What represents a double in sql server? 14 answers

Is it money, float, real, decimal, _________ ?

回答1:

Answer to this and all mapping of types can be found here.

SQL-CLR Type Mapping

Chart, stolen from that page:


Updated 1/7/2013 - there's a more recent version, .not so colorful here: SQL Server Data Type Mappings



回答2:

That would be float.

See Mapping CLR Parameter Data.



回答3:

Float is the sql type you are looking for.



回答4:

float matches best. real is only 32 bits in precision, so essentially useless.

See: http://msdn.microsoft.com/en-us/library/ms173773.aspx



回答5:

"The synonym for double precision is float(53)." Default value of n is 53.

From page http://msdn.microsoft.com/en-us/library/ms173773.aspx