Tuesday, July 10, 2012
The Argument Against Bit
I know a column of bit data type is very helpful as a flag or a code with only two valid values (three if you count NULL). However, I rarely use this data type to signify codes.
Say the column is used to identify an account status, which could be open or closed. More often than that, though, additional information is usually requested like when was it closed or when was it open. In this case, an AccountOpenDate and AccountCloseDate of date data type is more helpful.
I'm sure bit has its use, but sometimes I believe it's better to use a different data type that can hold other information than just three values.
As always, comments are welcome...
~~ CK
Subscribe to:
Posts (Atom)