开发者

Match against query in SQL

开发者 https://www.devze.com 2023-04-03 10:30 出处:网络
SELECT MATCH(Firstname,Lastname) AGAINST(\'+hy\'IN BOOLEAN MO开发者_JAVA技巧DE)Firstname,Lastname
SELECT MATCH(Firstname,Lastname)
AGAINST('+hy'IN BOOLEAN MO开发者_JAVA技巧DE)Firstname,Lastname 
FROM tbldemo 

This is my query, but the table is returning the entire table instead of returning the data contains 'hy'. How can it be possible?


You need a where clause...

How about this:

SELECT Firstname,Lastname 
FROM tbldemo 
WHERE MATCH(Firstname,Lastname) AGAINST('+hy' IN BOOLEAN MODE)
0

精彩评论

暂无评论...
验证码 换一张
取 消