Results 1 to 2 of 2

Thread: varchar limitation in MySQL

  1. #1
    Join Date
    Jun 2005
    Posts
    2

    varchar limitation in MySQL

    hi all,
    i want to migrate from SQLSerevr 2000 to MySQL 5.0.4. i've got a column type varchar(8000) in my source db. the reason of selecting varchar(8000) instead of text type is: we can't compare two text fields in SQLserver and i need to compare them some times.
    i don't want to change my application and cause of mysqls limitation in up to 256 char in a varchar,So i can't use varchar.
    what should I do in your opinion?

    Thanks in advance
    Chagh

  2. #2
    Join Date
    Apr 2005
    Location
    florida
    Posts
    89
    Values in VARCHAR columns are variable-length strings. The length can be specified as 1 to 255 before MySQL 4.0.2, 0 to 255 as of MySQL 4.0.2, and 0 to 65,535 as of MySQL 5.0.3. (The maximum actual length of a VARCHAR in MySQL 5.0 is determined by the maximum row size and the character set you use. The maximum effective length is 65,532 bytes.)

    Ref: http://dev.mysql.com/doc/mysql/en/char.html

Posting Permissions

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