#1
  1. Full Access
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jun 2000
    Location
    London, UK
    Posts
    2,019
    Rep Power
    17
    OK, I said most of it in the title. When in mySQL you define a VARCHAR you put a number in brackets after it. What is the meaning of that number? Is it the maximum number of characters that string can be?
  2. #2
  3. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    19
    Yep.
  4. #3
  5. Full Access
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jun 2000
    Location
    London, UK
    Posts
    2,019
    Rep Power
    17
    Thanks rod k, just out of interest, how do you become a member rather than a junior member on this bb?

    So in theory, I could just do VARCHAR(255) and I can have it up to 255 characters? Are there any disadvantages to this?
  6. #4
  7. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    19
    Just post a lot ;-)

    Yes you understand correctly. Generally you should use CHAR() wherever possible. However, if any fields would benefit from varchar() and you make them such, then all char() fields will become varchar() fields. Varchar() fields are advantageous when the data element size range is large.

Similar Threads

  1. Just a puzzle- to find day, given the date
    By murugesan in forum C Programming
    Replies: 7
    Last Post: September 16th, 2003, 11:41 AM
  2. Can you define an array constant with define()?
    By CyberN8 in forum PHP Development
    Replies: 5
    Last Post: July 12th, 2001, 12:40 PM
  3. weblogic apache bridge config
    By kalpana in forum Apache Development
    Replies: 0
    Last Post: December 7th, 2000, 12:58 PM
  4. php cant get it running
    By wheels in forum PHP Development
    Replies: 2
    Last Post: July 24th, 2000, 03:21 PM

IMN logo majestic logo threadwatch logo seochat tools logo