LIMIT and OFFSET

LIMIT -> Controls how many rows to return.

OFFSET -> Skips rows before returning results.

Syntax

SELECT column1, column2 FROM table_name LIMIT number OFFSET skip;

Example - return the first 5 students.

SELECT Name, GPA FROM Students LIMIT 5;

Another Example - Skip the first 5 and returns the next 5

SELECT Name, GPA FROM Students LIMIT 5 OFFSET 5;

Question number:

Up Next: Practice Filtering with LIKE

Donate

About

Privacy Policy

Changelog