LIMIT: Limits the number of rows returned by the query.
SELECT column1
FROM table_name
LIMIT 10;
OFFSET: Skips a specified number of rows before starting to return rows.
SELECT column1
FROM table_name
OFFSET 5 ROWS
LIMIT 10;
-- the first row number is 0
-- if we want to start from row number 6, we have to write 7
BETWEEN: Filters records within a specified range.
SELECT column1
FROM table_name
WHERE column2 BETWEEN value1 AND value2;
IN: Filters records that match any value in a list.
SELECT column1
FROM table_name
WHERE column2 IN (value1, value2, value3);
-- We can use number and text both as value like-
-- WHERE grade IN ('A', 'B', 'C');
-- WHERE category_id IN (1, 2, 3);
LIKE: Searches for a specified pattern in a column.
SELECT column1
FROM table_name
WHERE column2 LIKE 'pattern%';
IS NULL / IS NOT NULL: Checks for NULL or non-NULL values.
SELECT *
FROM table_name
WHERE column2 IS NULL;
-- all row will print where value of column2 IS NULL
