4

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?

Community
  • 1
  • 1
hungrycoder
  • 507
  • 2
  • 9
  • 24

1 Answers1

5

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]

Andreas Wong
  • 59,630
  • 19
  • 106
  • 123