SQL • LESSON 08

Sorting & Limiting Results

Learn how to sort and limit SQL query results using ORDER BY and LIMIT.

🟡 Intermediate⏱ 2 Minutes⭐ 160 XP
🤔 THE QUESTION

How can we search for text when we only know part of the value?

💡 WHAT IS IT?

The LIKE operator lets SQL search text using patterns instead of requiring an exact match.

🎯 WHAT IS IT USED FOR?

It is commonly used for searching names, emails, product descriptions, addresses, and other text fields.

💻 EXAMPLE
SELECT *
FROM employees
WHERE name LIKE 'A%';

Mission Brief

Practice sorting employee records and limiting the number of results returned.

Objectives

  • SELECT
  • FROM
  • ORDER BY
  • DESC
  • LIMIT