On 2016-05-14 11:30 AM, James K. Lowden wrote:
> I suggest the reason LIMIT hasn't been standardized is that it's
> contrary to the fundamental idea that rows in a table have no
> meaningful order.  SQL doesn't honor relational theory with complete
> fidelity, but at least that horse is still in the barn.
>
> The problem with LIMIT is it's not based in the data.  Cutting off
> results at some arbitrary N tells you *nothing* about the data other
> than that N or more rows met the criteria.  Note that predicate logic
> has constructs for "for all" and "there exists" , but not "are some"!

You seem to be forgetting the fact that LIMIT/OFFSET is not its own clause, 
rather it is an extension to the ORDER BY clause and only has meaning within 
the 
context of the ORDER BY it is part of.

That being said, one could argue that LIMIT by itself (no offset) could be 
standalone, but then without an ORDER BY all say "LIMIT N" means is "give me a 
random subset of size N of the rows", but then there probably is alternate 
syntax that may say this more explicitly, eg "PICK N".

-- Darren Duncan

Reply via email to