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
 use money or int for currency values

Author  Topic 

deviji
Starting Member

7 Posts

Posted - 2008-08-21 : 03:11:40
Dear All,

1. May i use datatype money or int for storing currency values please advice me the pros or cons choosing either

2. what datatype can be used for yes/no true/false kind of data.

Thanks
Regards
Viji

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-08-21 : 03:36:20
1. if its currency value you can use money itself
2. The best choice is to use bit datatype.
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2008-08-21 : 03:56:38
The Datatype INT has no decimal places so you can store currency values only in cent for example.

Webfred

Planning replaces chance by mistake
Go to Top of Page

deviji
Starting Member

7 Posts

Posted - 2008-08-21 : 05:27:46
Thanks to visakh16 and webfred.
and visakh16 - if i store yes/no as a bit how will i get it from the front end or the web
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-08-21 : 06:38:51
quote:
Originally posted by deviji

Thanks to visakh16 and webfred.
and visakh16 - if i store yes/no as a bit how will i get it from the front end or the web


you can get it as 0 or 1 value and them use it as it as or as boolaen true or false in front using conversion functions.
Go to Top of Page
   

- Advertisement -