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

SQL · Theory

Wildcards

← All stacks

Theory

305/439

Wildcards

LIKE wildcards — % any string, _ one character. Not * . In REGEXP, . and .* are different. Don’t mix the two languages.

ESCAPE if you need a literal % — LIKE '%10\%%' ESCAPE '\\' (messy — mention you can escape).

Trap — * from globbing files.

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

Exam tip

LIKE 'A%' and LIKE 'A_ha'. Not *.

Wildcards — sample query

-- Wildcards
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;

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

Short notes

  • DefLIKE % and _ . REGEXP is separate.
  • Rule% = many, _ = one.
  • TrapUsing * in LIKE.

Questions

1

LIKE any characters?

305 / 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.