SQL-Quiz: LIKE, IN & BETWEEN

This SQL quiz covers the handy WHERE operators LIKE, IN and BETWEEN. You will match text with % and _, check values against a list and filter ranges, including the edge cases that catch people out.

Leicht 10 Fragen ~5 Minuten Bestanden ab 80% SQLite

Modus wählen

Du spielst als Gast: Melde dich an, damit XP und Serie gespeichert werden.

Beispielfrage

Frage 1 von 10

What does this query return?

CREATE TABLE people (name TEXT, age INTEGER);
INSERT INTO people VALUES ('Anna', 22), ('Ben', 35), ('Bella', 28), ('Carl', 40), ('Dan', 30);
SELECT name FROM people WHERE name LIKE 'B%' ORDER BY name;
Lösung zeigen

A. Bella Ben % matches any number of characters (even zero), so 'B%' means "starts with B". ORDER BY name puts Bella before Ben.

Darum geht es in diesem Quiz

  • Pattern matching with LIKE, % and _
  • Case sensitivity of LIKE in SQLite, MySQL and PostgreSQL
  • Checking a list of values with IN and NOT IN
  • BETWEEN includes both ends
  • Why the order of the BETWEEN bounds matters

Häufige Fragen

Brauche ich ein Konto?

Nein. Jeder kann spielen. Mit Anmeldung werden XP, Serie, Abzeichen und Verlauf gespeichert.

Kann ich es wiederholen?

Ja. Dein Bestwert bleibt erhalten, und Fragen und Antworten werden jedes Mal neu gemischt.