PGoCareerGoCareer prep tools
LoginSign up
  • Java
  • Python
  • AI
  • React
  • Angular
  • PHP
  • Node.js
  • SQL
  • DSA
  • HTML
  • CSS
  • JS
  • Spring
  • ML
  • MongoDB

SQL · Theory

Fulltext Search

← All stacks

Theory

98/439

Fulltext Search

FULLTEXT index lets MATCH (title, body) AGAINST ('exam prep') search words, not LIKE '%exam%'. Needs a FULLTEXT index on those columns (InnoDB in 5.6+).

Natural language mode is default. BOOLEAN MODE uses +must -mustnot. Query expansion is a follow-up search — mention only if asked.

Trap: FULLTEXT on InnoDB with tiny tables (minimum token length, stopwords). Trap: MATCH on columns that are not in the index together.

On the example next to this theory: Fulltext Search: create two demo rows, then SELECT qty >= 2 ordered. Say which labels come back.

Exam tip

MATCH (col) AGAINST ('words') needs a FULLTEXT index.

Fulltext Search — sample query

-- Fulltext Search
CREATE TABLE demo (
  id INTEGER PRIMARY KEY,
  label TEXT NOT NULL,
  qty INTEGER DEFAULT 0
);
INSERT INTO demo (id, label, qty) VALUES
  (1, 'alpha', 2),
  (2, 'beta', 5);
SELECT label, qty FROM demo WHERE qty >= 2 ORDER BY qty DESC;

Fulltext Search: create two demo rows, then SELECT qty >= 2 ordered. Say which labels come back.

Short notes

  • DefFULLTEXT + MATCH … AGAINST for word search.
  • RuleIndex those columns. InnoDB supported.
  • TrapLIKE '%word%' instead of MATCH when you already have FULLTEXT.

Questions

1

How do you search words in MySQL?

98 / 439

P

GoCareerGo

Utilities · Preparation Hub · Resume · CV · Tools — one workspace.

Workspace

DashboardProfilePreparation HubResume builderCV builderCareer planning

PDF Tools

Merge PDFSplit PDFCompress PDFImage to PDFAll toolsJobs

Image & QR

Compress ImageResize ImageQR ScannerQR GeneratorBlogIT interview prep

Company

FAQFeedbackContactPrivacyTermsSitemap

© 2026 GoCareerGo. Keep moving forward.