欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

Rankings with InnoDB Full-Text Search_MySQL

程序员文章站 2024-01-22 11:59:16
...
mysql>CREATETABLEarticles

-> idINTUNSIGNEDAUTO_INCREMENTNOT NULLPRIMARY KEY,

-> titleVARCHAR(200),

-> bodyTEXT,

-> FULLTEXT(title,body)

-> )ENGINE=InnoDB;

QueryOK,0rowsaffected

mysql>INSERTINTOarticles(title,body)VALUES('Test Article','blah blah blah'),("Matt's Noise",'this is noisy'),('February Weather','It was terrible this year.'),('Peter Pan','Tis a kids story.'),('Test1','nada'),('Database database database','foo database database database'),('Database article title','body with lots of words.'),('myfulltext database','my test fulltext database');

QueryOK,8rowsaffected

Records:8 Duplicates:0 Warnings: