Row size too large error in mysql create table query

前端 未结 7 432
萌比男神i
萌比男神i 2020-12-08 06:56

I am trying to create a table with the below query

Create Table PerformaceReport
(
campaignID int,
keywordID bigint,
keyword varchar(8000),
avgPosition decim         


        
7条回答
  •  离开以前
    2020-12-08 07:32

    The total size of all fields in the table is more than the limit, 65535, that's why you are getting this error.

    You should use text type instead of varchar for long strings. Replace all varchar(8000) with text, and it should work.

    Or, even better, use appropriate data types instead of the "too large" ones. You don't really need 8000 characters to store currency, do you?

提交回复
热议问题