I'm trying to create a table which one of their columns will hold characters more than 5000 characters and I don't want any row for this column to be repeated so I used a primary key to make every row in this column not save again when it's already exist
But the problem is when I'm trying to create this column with column_name VARCHAR(5500) Primary key
it's giving me this error
Specified key was too long; max key length is 767 bytes
I searched a lot and found that InnoDB
engine accepts only 767 characters as max length and in MYISAM
engine accepts 1000 character but this doesn't help me because this column maybe hold more than 5000 character
What I'm looking for is a way to create a column which no one of its rows can be repeated and accepts many characters
CREATE TABLE data_table (
date_time VARCHAR(100),
message VARCHAR(5500) PRIMARY KEY
) ENGINE = MYISAM CHARACTER SET latin1