Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Datatype

Author  Topic 

pmccann1
Posting Yak Master

107 Posts

Posted - 2007-02-28 : 11:10:51
what date type is bet used when there is some occaions the user may enter 2.5 etc

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-02-28 : 11:15:05
What is the use for the value "2.5"?

Try SMALLMONEY or DECIMAL (3, 1)


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

snSQL
Master Smack Fu Yak Hacker

1837 Posts

Posted - 2007-02-28 : 11:15:35
That depends

For very large or small numbers and compact storage and if you can tolerate some rounding errors - use float
For pretty large or small numbers with less compact storage but with exact precision and no rounding errors - use decimal

Look them up in Books Online for more specifics
Go to Top of Page
   

- Advertisement -