SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict
    Join Date
    Jun 2001
    Location
    Malaysia
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    max limit for mySQL variables

    hey guys...

    when i define vars. in mySQL like VARCHAR(), INT() and so on.... what's the max. limit I can specify for these? 1024?

  2. #2
    SitePoint Enthusiast
    Join Date
    Jun 2001
    Posts
    83
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    don't know much about SQL, but can't you define the max characters in the <input type=text> ?

  3. #3
    SitePoint Addict
    Join Date
    Jun 2001
    Location
    Malaysia
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    oh no.. I wasn't talking about that...

    I meant when you're creating tables in raw SQL code....

    What's the maxlimit for X in VARCHAR(X) you can hit when specifying something like :

    CREATE TABLE PDC_EMP (
    WWID INT NOT NULL PRIMARY KEY,
    NAME VARCHAR(X),

    ......

    );

  4. #4
    ********* Callithumpian silver trophy freakysid's Avatar
    Join Date
    Jun 2000
    Location
    Sydney, Australia
    Posts
    3,798
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    CHAR and VARCHAR max length is 255 chars. Otherwise use one of the TEXT types.
    http://www.mysql.com/doc/C/H/CHAR.html

    Unsigned INT range is -2147483648 to 2147483647.
    Signed INT range is 0 to 4294967295.
    http://www.mysql.com/doc/N/u/Numeric_types.html

    7.3 of the manual has all this info.

  5. #5
    Making a better wheel silver trophy DR_LaRRY_PEpPeR's Avatar
    Join Date
    Jul 2001
    Location
    Missouri
    Posts
    3,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    freaky, you have the singed/unsigned ranges backwards.

  6. #6
    SitePoint Addict
    Join Date
    Jun 2001
    Location
    Malaysia
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    never mind.. I get it


Bookmarks

Posting Permissions

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