If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Can not create table in mysql with more than 255 fields

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-08-06, 04:32
kapil.dhakad kapil.dhakad is offline
Registered User
 
Join Date: Jul 2005
Posts: 11
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.
Reply With Quote
  #2 (permalink)  
Old 01-09-06, 16:09
yellowmarker yellowmarker is offline
Registered User
 
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?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On