select col1,col2,col3,col4,col5 from table1
where (col1 like '%keyword%'
or col2 like '%keyword%'
or col3 like '%keyword%'
or col4 like '%keyword%'
or col5 like '%keyword%' )
AND start_date IS NULL
AND end_date IS NULL
ORDER BY date_created limit 10;
我想将上述查询转换为使用MATCH AGAINST
函数。
答案 0 :(得分:0)
SELECT col1,col2,col3,col4,col5
FROM table1
WHERE MATCH(col1, col2, col3, col4, col5) AGAINST ('+keyword')
AND start_date IS NULL
AND end_date IS NULL
ORDER BY date_created limit 10;