Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add FullText Capability to existing table in MySql [duplicate]

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?

like image 216
hungrycoder Avatar asked Oct 28 '25 09:10

hungrycoder


1 Answers

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]

like image 63
Andreas Wong Avatar answered Oct 31 '25 00:10

Andreas Wong



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!