Friday 18 March 2011

Informix LIMIT Clause

Informix has a proprietary specification of LIMIT clauses, via the FIRST and SKIP keywords:
SELECT FIRST 5 SKIP 20 * FROM mytable WHERE a = 1 ORDER BY b;
In comparison MySQL uses the following syntax:
SELECT * FROM mytable WHERE a = 1 ORDER BY b LIMIT 5 OFFSET 20;
I don't know that one is better than the other, but this is for reference.

No comments:

Post a Comment