El Lun 27 Jun 2005 12:34, Markus Bertheau ☭ escribió:
> Hi,
> 
> is there a reason that
> 
> SELECT * FROM t1 OFFSET -1 LIMIT 1
> 
> does not return 0 rows? Accordingly
> 
> SELECT * FROM t1 OFFSET -1 LIMIT 2
> 
> should return 1 row, imo.

From the docs:

 The LIMIT clause consists of two independent sub-clauses:

LIMIT { count | ALL }
OFFSET start

count specifies the maximum number of rows to return, while start specifies 
the number of rows to skip before starting to return rows. When both are 
specified, start rows are skipped before starting to count the count rows to 
be returned.

How do you skip -1 rows?

-- 
select 'mmarques' || '@' || 'unl.edu.ar' AS email;
---------------------------------------------------------
Martín Marqués          |   Programador, DBA
Centro de Telemática    |     Administrador
               Universidad Nacional
                    del Litoral
---------------------------------------------------------

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Reply via email to