A quick Question. Suppose I have the following two queries:
SELECT TOP 2 * FROM Persons;
and
SELECT * FROM Persons limit 2;
As stated in my comment for Martin Smith's answer above, there are products that support both, LIMIT
and TOP
(as you can see here). The difference is that TOP
only selects the first n records, but LIMIT
allows the definition of an offset to retrieve a specific range of records:
SELECT * FROM ... LIMIT 5 OFFSET 10
This statement selects the first 5 records, after skipping 10 records and this isn't possible with TOP
.
The example I posted is only checked against the DBS I linked above. I didn't check a SQL standard, because of a lack of time.