?????????????ó????????????????????????????????????????????????????????λ????????????????Щ????????????SELECT????е?LIKE??????????????????????????????У????????????????????????Ч???????μ??????????????????????????

????MySQL????????????????????????????????????????????????????????????????????????????Σ????????????MySQL????????Щ?????????????????????????????Ч??????MySQL????Щ???????????????????????????????????????????????????MySQL?????????????????????????????????????????

??????????????????????MySQL????ν????????????

????????????????????????μ?SQL????

mysql> CREATE TABLE reviews (id INT(5) PRIMARY KEY NOT NULL AUTO_INCREMENT?? data TEXT);

???????????????????????????????????????????ε?????????????????????????Щ?????

mysql> INSERT INTO `reviews` (`id`?? `data`) VALUES(1?? 'Gingerboy has a new single out called Throwing Rocks. It's great!');
mysql> INSERT INTO `reviews` (`id`?? `data`) VALUES (2?? 'Hello all?? I really like the new Madonna single. One of the hottest tracks currently playing...I've been listening to it all day');
mysql> INSERT INTO `reviews` (`id`?? `data`)VALUES (3?? 'Have you heard the new band Hotter Than Hell?They have five members and they burn their instruments when they play in concerts. These guys totally rock! Like?? awesome?? dude!');

??????????????????

mysql> SELECT * FROM reviews;
+----+--------------------------------------------+
id  data
+----+--------------------------------------------+
1  Gingerboy has a new single out called ...
2  Hello all?? I really like the new Madon ...
3  Have you heard the new band Hotter Than...
+----+--------------------------------------------+
3 rows in set (0.00 sec)

??????????????????????????????????????

mysql> ALTER TABLE reviews ADD FULLTEXT INDEX (data);
Query OK?? 3 rows affected (0.21 sec)
Records: 3  Duplicates: 0  Warnings: 0

???????SHOW INDEXES????????????????????????

mysql> SHOW INDEXES FROM reviews;
+---------+---------------+--------+------+------------+---------+
Table    Column_name    Packed  Null  Index_type  Comment
----------+---------------+--------+------+------------+---------+
reviews   id            NULL          BTREE
reviews   data          NULL    YES   FULLTEXT
+---------+---------------+--------+------+------------+---------+

???????????????????????????????MySQL???????????????????????????????MATCH...AGAINST????SELECT???????????????????????????????????е???“single”??????

mysql> SELECT id FROM reviews WHERE MATCH (data) AGAINST ('single');
+----+id +----+
1
2
+----+