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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Server 2005 Table Setup Easy Question

Status
Not open for further replies.

szaunbr

Technical User
Jul 5, 2006
50
US
Hello.

I have a simple/stupid question (i think). I am setting up a table in SQL Server 2005 tracking employee demographic info.

I have come to the gender field. I will be inserting two fields for this, a gender_male field and gender_female field. I need both of these fields to store the value of
y/n or true/false.

I'm not sure what data type I need for this field.

Thanks in advance.
 
Thank you so much. That worked out perfectly. I used the bit.
 
If you are storing a true/falue or other vield where you will have two options and only two options and they will always be 0 or 1 then BIT is the correct option.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top