Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn The LIMIT Keyword | Sorting Data
Introduction to SQL

bookThe LIMIT Keyword

  • The LIMIT keyword can be used for limiting the number of rows that are fetched as a result of a SELECT statement;
  • The LIMIT keyword always comes after the ORDER BY clause;
12345
SELECT * FROM students WHERE age < 20 ORDER BY enrollment_date LIMIT 1;
copy
question-icon

Complete the query to select the top 4 highest-paid employees in the IT department.

Click or drag`n`drop items and fill in the blanks

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 3. ChapterΒ 8

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

Suggested prompts:

Ask me questions about this topic

Summarize this chapter

Show real-world examples

Awesome!

Completion rate improved to 1.72

bookThe LIMIT Keyword

Swipe to show menu

  • The LIMIT keyword can be used for limiting the number of rows that are fetched as a result of a SELECT statement;
  • The LIMIT keyword always comes after the ORDER BY clause;
12345
SELECT * FROM students WHERE age < 20 ORDER BY enrollment_date LIMIT 1;
copy
question-icon

Complete the query to select the top 4 highest-paid employees in the IT department.

Click or drag`n`drop items and fill in the blanks

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 3. ChapterΒ 8
some-alt