1-- examble to create fulltext index on posts table on blog
2
3CREATE FULLTEXT INDEX IF NOT EXISTS idx_title_body ON
4 posts(title, body);
5
6SELECT
7 *
8FROM
9 posts
10WHERE
11 MATCH(title, body) AGAINST("search words" IN BOOLEAN MODE);
1CREATE FULLTEXT INDEX IF NOT EXISTS idx_col1_col2 ON
2 tableName(col1, col2);
3
4SELECT
5 *
6FROM
7 tableName
8WHERE
9 MATCH(col1, col2) AGAINST("search words");