Indexing a MySql TEXT column?

You can’t have a UNIQUE index on a text column in MySQL.

If you want to index on a TEXT or a BLOB field, you must specify a fixed length to do that.

From MySQL documentation:

BLOB and TEXT columns also can be
indexed, but a prefix length must be
given.

Example:

CREATE UNIQUE INDEX index_name ON misc_info (key(10));

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)