Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DB Design

Status
Not open for further replies.

mayu03

Programmer
Oct 3, 2003
91
US
What data type should be for a fields with values (0/1)or(Y/n).
 
actually, to be pedantic, Y/N will not fit into a bit field, you need at least a byte to represent a character, but i'm going to assume what is actually desired here is a boolean

my suggestion: smallint with a check constraint for value in (0,1)

that way you can count true rows with sum()



rudy
SQL Consulting
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top