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
 bit datatype

Author  Topic 

hotshot_21
Yak Posting Veteran

97 Posts

Posted - 2007-08-22 : 09:52:08
i have a field in table x withe datatype bit.
if i store say value 64. it will store it as 1. then if i store another no. say 43 and so on.
then how do i retireve those values from table. say i want ot retrieve 64 the how will sql recoginze i want to retireve 64 as it is stored as 1 in the datafield

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-08-22 : 09:53:53
you use bit datatype and you want to store the value 64 into it ? ?


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-08-22 : 09:55:25
read this from BOL http://msdn2.microsoft.com/en-us/library/ms177603.aspx


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

hotshot_21
Yak Posting Veteran

97 Posts

Posted - 2007-08-22 : 09:55:46
yes its just a question iam not implementing it . will sql server will be able to differentiate all values
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-08-22 : 09:59:25
As the BOL says
quote:
bit (Transact-SQL)

An integer data type that can take a value of 1, 0, or NULL.



KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -