PDA

View Full Version : what's the most effecient way to store a number from 1-5?


catch
03-25-02, 18:03
heylo,

i was wondering if anyone has had any experience storing an integer value for a given range. i want to store an integer between 1-5 for evaluations on a site.

i think using the integer data type is overkill, so i thought i would use a single char type. i'm wondering if there is a more effecient manner to do this since i want to be able to perform calculations on data (averages, basically). is it better to use an integer and waste space or use a char and waste processing time converting the character into an integer? maybe i can use 3 bits somehow?

kharsa60
03-26-02, 03:39
check constraints of the column like :

id <=5
you can set this by using table design in the enterprise manager

catch
03-26-02, 18:26
thanks. what's the enterprise manager?