Professional Documents
Culture Documents
SQL
Restricting and Sorting Data
Operator Meaning
BETWEEN
Between two values (inclusive)
…AND…
IN (list) Match any of a list values
LIKE Match a character pattern
IS NULL Is a null value
Operator Meaning
Returns TRUE if both
AND
component conditions are TRUE
Returns TRUE if either
OR
component condition are TRUE
Returns TRUE if the following
NOT
condition is FALSE
• In this syntax:
– ROW and FIRST are synonymous with ROWS and
NEXT respectively.
– The start is an integer that must be zero or positive.
By default, it is zero if the OFFSET clause is not
specified.
– The row_count is one or higher. By default, the value of
row_count is one if it is not specified.
Pascal TUFENKJI 40 Database SQL
FETCH & OFFSET
• The following query returns the first row of the film
sorted by title
Database Keyword
PostgreSQL Limit x Offset y
MySQL Limit x, y
SQL Server Top x
Oracle Rownum