How to create FULLTEXT index on multiple columns?

后端 未结 3 1161
温柔的废话
温柔的废话 2021-01-31 16:44

I am running the following query on tbl_query

select * from tbl_query q where match(q.query_desc,q.query_desc_details) against (\'test1\' WITH QUERY         


        
相关标签:
3条回答
  • 2021-01-31 17:15
    ALTER TABLE `TableName`
        ADD FULLTEXT INDEX `IndexName` (`ColumnName`);
    
    0 讨论(0)
  • 2021-01-31 17:25

    Fulltext with 2 columns you create like this

    ALTER TABLE tbl_query
    ADD FULLTEXT INDEX `FullText` 
    (`query_desc` ASC, `query_desc_details` ASC);
    
    0 讨论(0)
  • 2021-01-31 17:31

    This creates the index. Is this what you want?

    ALTER TABLE table ADD FULLTEXT index_name(column1, column2);
    
    0 讨论(0)
提交回复
热议问题