创建表时没有对 prod_name 进行 FULLTEXT 索引,因为书上说即使不索引页可以使用 IN BOOLEN MODE。 但提示了错误
mysql> describe products;
+------------+----------+------+-----+---------+-------+
| Field      | Type     | Null | Key | Default | Extra |
+------------+----------+------+-----+---------+-------+
| prod_id    | int(11)  | NO   | PRI | 0       |       |
| vend_id    | int(11)  | YES  |     | NULL    |       |
| prod_name  | char(50) | YES  |     | NULL    |       |
| prod_price | int(11)  | YES  |     | NULL    |       |
| prod_desc  | char(50) | YES  |     | NULL    |       |
+------------+----------+------+-----+---------+-------+
5 rows in set (0.05 sec)mysql> select * from products;
+---------+---------+------------------+------------+-----------+
| prod_id | vend_id | prod_name        | prod_price | prod_desc |
+---------+---------+------------------+------------+-----------+
|       1 |       1 | windows 操作系统 |        400 | NULL      |
|       2 |       1 | Word软件         |        500 | NULL      |
|       3 |       1 | Excel软件        |        650 | NULL      |
|       4 |       1 | PowerPoint软件   |        750 | NULL      |
|       5 |       2 | 雕牌肥皂         |          3 | NULL      |
|       6 |       2 | 雕牌洗衣粉       |          9 | NULL      |
|       7 |       2 | 雕牌洗洁精       |          4 | NULL      |
+---------+---------+------------------+------------+-----------+
7 rows in set (0.00 sec)mysql> select prod_name from products where match(prod_name) against('雕牌肥皂'
in boolean mode);
ERROR 1214 (HY000): The used table type doesn't support FULLTEXT indexes

解决方案 »

  1.   

    楼主,你的表是myisam类型的么.ERROR 1214 (HY000): The used table type doesn't support FULLTEXT indexes
      

  2.   

    不知道啊。就是默认的
    create table XX
    (
      ....
      ....
    )
      

  3.   

    create table XX
    (
      ....
      ....
    )engine =Myisam
      

  4.   

    加了engine =Myisam以后又创建了个名为xx的表
    mysql> select*from xx;
    +------------------------------------------------+
    | prod_name                                      |
    +------------------------------------------------+
    | 人民邮电出版社 必知必会 学习与参考皆宜 afx msg |
    +------------------------------------------------+mysql> select prod_name from xx where match(prod_name) against('"fax"' in boolea
    n mode);
    Empty set (0.00 sec)
      

  5.   


    你把afx写错成了fax,当然查不到了:select prod_name from xx where match(prod_name) against('"afx"' in boolea
    n mode);
      

  6.   

    改了还是空呢
    mysql> select prod_name from xx where match(prod_name) against('"afx"' in boolea
    n mode);
    Empty set (0.00 sec)
      

  7.   

    我测试没问题,可能是楼主自己环境的问题,按照这个帖子检查下自己的问题;
    http://topic.csdn.net/u/20110112/15/58b02bd0-ce12-4206-b7b8-d64587d6408f.html?28490