views:

82

answers:

4

Hi, I want to create table which is having 216 fields but when I am trying to create it I got below error in mysql.

#1118 - Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs 

I don't know what is its solution. please help me out.

+5  A: 

The problem is exact what mysql is telling you : you have too much data for one table. Not only the number of fields are counting towards them, but also their size..

But the real problem is in your database design, you have designed a table that is crying out for help : 'split me up, split me up!'

You should normalize your design ..

Peter
+1  A: 

Row size too large. It means just that. Do you really need all those 216 fields? Can you cut them down?

If you really need those 216 fields, consider breaking them into 2-3 tables with 1:1 mapping from one to the other.

Lukman
A: 

Minimizing the field sizes or make text / blobs of them instead.

Show us the create table command you are trying to run.

bang
+1  A: 

The error message is pretty clear. Add up the size of all your 216 fields and you should see that it exceeds the maximum. As @Peter said you really need to re-think your design. I table should have more than a few dozens fields maximum!

ennuikiller