Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2002
    Location
    Toronto
    Posts
    13

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

    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?

  2. #2
    Join Date
    Mar 2002
    Posts
    10

    id in (1,2,3,4,5)

    check constraints of the column like :

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

  3. #3
    Join Date
    Mar 2002
    Location
    Toronto
    Posts
    13
    thanks. what's the enterprise manager?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •