Click here to Skip to main content
15,919,879 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have an attribute 'Exam' that can have only two values 'Even ' and 'Odd'.
So how do I set it in the table? like a bit value ? or like varchar?

What I have tried:

if I use varchar, then the column has only 'Even' and 'Odd' values. so that will lead to normalization issues?
Posted
Updated 3-Mar-16 2:19am
v3

1 solution

If you are absolutely sure that you will ever have only two values for this then go with bit. Consider 0 as even and 1 as odd.
 
Share this answer
 
Comments
Maciej Los 3-Mar-16 9:41am    
The same as True/False, Yes/No, In/Out, etc.
5ed!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900