Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

VARCHAR address

Options
  • 15-03-2005 1:50am
    #1
    Registered Users Posts: 884 ✭✭✭


    Lads, just wondering ...... how many characters in a varchar address and is it best to increment in 8's (i.e. 48 char, 56 char) to maximise space or conserve it as the case may be ..... or am i totally wrong here.


Comments

  • Registered Users Posts: 21,264 ✭✭✭✭Hobbes


    Try the programming forum. Its generally up to you afair though.


  • Registered Users Posts: 1,481 ✭✭✭satchmo


    I think it's anything from 1 to 255 bytes, depending on how you specify. At least it is in MySQL anyway. As for aligning to 8 bytes, I don't see how this would have any speed or storage advantages over just making it the exact size you need.


  • Registered Users Posts: 884 ✭✭✭Cork Skate


    satchmo wrote:
    I think it's anything from 1 to 255 bytes, depending on how you specify. At least it is in MySQL anyway. As for aligning to 8 bytes, I don't see how this would have any speed or storage advantages over just making it the exact size you need.


    Cheers for that !!


  • Registered Users Posts: 15,443 ✭✭✭✭bonkey


    Cork Skate wrote:
    how many characters in a varchar address

    Do you actually mean how many in a varchar address (i.e. the information that points to where your data is stored as a varchar), or do you mean how many characters in a varchar field.
    and is it best to increment in 8's (i.e. 48 char, 56 char) to maximise space or conserve it as the case may be ..... or am i totally wrong here.
    (Suggests you're talking about fields)

    This is a Database-dependant question, and you haven't said which DB you're using.

    jc


  • Registered Users Posts: 4,003 ✭✭✭rsynnott


    He's probably talking about MySQL; think VARCHAR is basically a MySQL one. Yep, 255 is the maximum (if you need more, use TEXT or BLOB), and don't think there's any special reason to align it, though if you were doing a lot of comparisons between two fields, it might help if they were the same size.


  • Advertisement
Advertisement