Add FullText Capability to existing table in MySql [duplicate]
-
27-06-2021 - |
Question
Possible Duplicate:
MySQL/PHP Search Efficiency
How to Add FullText Capability to the existing table in MySQL.
I've seen adding it directly at the time of table creation as follow.
CREATE TABLE articles (
id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
title VARCHAR(200),
body TEXT,
FULLTEXT (title,body)
);
But how to add FullText Manually after the table is created?
Solution
According to the docs at http://dev.mysql.com/doc/refman/5.0/en/alter-table.html
ALTER TABLE TABLE_NAME ADD [FULLTEXT|SPATIAL] [INDEX|KEY] [index_name]
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow