Квиз по SQL: 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.

Лёгкий 10 вопроса ~5 минуты Проходной балл: 80% SQLite

Выберите режим

Вы играете как гость: войдите, чтобы сохранить XP и серию.

Пример вопроса

Вопрос 1 из 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;
Показать ответ

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

Что проверяет этот квиз

  • 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

Частые вопросы

Нужен ли аккаунт?

Нет. Играть может любой. Войдите, чтобы сохранять XP, серию, значки и историю.

Можно пройти ещё раз?

Да. Лучший результат сохраняется, а вопросы и ответы каждый раз перемешиваются.