#2
阿ki2019-02-12 14:44
回复 楼主 花脸
|
程序代码:
create table text(
-> id int not null auto_increment,
-> texts text null,
-> primary key(id),
-> fulltext(texts))engine=myisam;
跟新原有的数据-> id int not null auto_increment,
-> texts text null,
-> primary key(id),
-> fulltext(texts))engine=myisam;
update text set texts='happer new year!';
查看表中的数据程序代码:
select * from text;
+----+------------------+
| id | texts |
+----+------------------+
| 1 | happer new year! |
| 2 | happer new year! |
| 3 | happer new year! |
+----+------------------+
j进行全文本搜索+----+------------------+
| id | texts |
+----+------------------+
| 1 | happer new year! |
| 2 | happer new year! |
| 3 | happer new year! |
+----+------------------+
select texts from text where match(texts) against('new');
Empty set (0.00 sec)
Empty set (0.00 sec)