Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2005
    Posts
    11

    Unanswered: Can not create table in mysql with more than 255 fields

    Can u please help me, its urgent:

    I want to create one table in MySQL which having more than 256 fields. Currently MySQL not permitting to create table with more than 256 fields.

    Is there any solution ?
    Is there any setting in mysql using which we can do this ?

    Thanks in advance
    - Kapil Dhakad
    IT Shastra (I) Pvt. Ltd.

  2. #2
    Join Date
    Jul 2004
    Location
    Dundee, Scotland
    Posts
    107
    Assuming you are using the default MySQL table which is 'MyISAM' the maximum size of a row is said to be 65,534 bytes. No upper limit of the number of columns which can be defined is published in the online manual. When I did a google search users had created tables with 3000+ columns and found that the length of the column names and the amount of data held in each field (or more acurately the defined field sizes) seem to affect the number of columns allowed (when the table is created). Some users write that the maximum number of columns in one MyISAM (MySQL) table is: 3398, which they have tested themselves.

    According to the online documentation there are no server variables that directly limit the number of columns to 256.

    The online manual suggests the alternative InnoDB MySQL tables can have up to 1000 columns.

    If you reply, please indicate which version of MySQL you are using. also, are you using additional software to interface to MySQL such as phpMyAdmin or are you using the command line?

Posting Permissions

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