KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I want to store a user's gender in a database with as little (size/performance) cost as possible. So far, 3 scenarios come to mind Int - aligned with Enum in code (1 = Male, 2 = Female, 3 = ...) char(1) - Store m , f or another single character identifier Bit (boolean) - is there an appropriate field name for this option? The reason I ask is because of this answer which mentions that chars are smaller than booleans . I should clarify that I'm using MS SQL 2008, which DOES in fact have the bit datatype.
Tags (comma-separated)
Save Edits
Cancel