教您如何实现MySQL全文查询

  发布时间:2025-11-04 10:45:01   作者:玩站小弟   我要评论
复制mysql>CREATETABLEarticles( ->idINTUNSIGNEDAUTO_INCREMENTNOTNULLPRIMARYKEY, 。
教您如何实现MySQL全文查询
复制mysql> CREATE TABLE articles (    -> id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,教何    -> title VARCHAR(200),    -> body TEXT,    ->FULLTEXT(title,body)    -> );    Query OK, 0 rows affected (0.00 sec)   mysql> INSERT INTO articles VALUES    -> (NULL,\MySQLTutorial\, \DBMS stands for DataBase ...\),    -> (NULL,\How To UseMySQLEfficiently\, \After you went through a ...\),    -> (NULL,\OptimisingMySQL\,\In this tutorial we will show ...\),    -> (NULL,\1001MySQLTricks\,\1. Never runMySQLd as root. 2. ...\),    -> (NULL,\MySQLvs. YourSQL\, \In the following database comparison ...\),    -> (NULL,\MySQLSecurity\, \When configured properly,MySQL...\);    Query OK, 6 rows affected (0.00 sec)    Records: 6 Duplicates: 0 Warnings: 0    mysql> SELECT * FROM articles    -> WHERE MATCH (title,body) AGAINST (\database\);    +----+-------------------+------------------------------------------+    | id | title | body |    +----+-------------------+------------------------------------------+    | 5 |MySQLvs. YourSQL | In the following database comparison ... |    | 1 |MySQLTutorial | DBMS stands for DataBase ... |    +----+-------------------+------------------------------------------+    2 rows in set   1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.19.20.21.22.23.24.25.26.27.28.29.
  • Tag:

相关文章

最新评论