On 22-09-2011 18:37:05 +0200, Roberto Cornacchia wrote: > On Thu, Sep 22, 2011 at 18:13, Fabian Groffen <[1][email protected]> > wrote: >> On 22-09-2011 16:58:12 +0200, Lefteris wrote: >> > just because microsoft does it for another operator does not mean that it >> is >> > the correct intuitive way to do it. > >> [2]http://sql-plsql.blogspot.com/2010/05/sql-top.html > > On this I second Lefteris. > > The syntax used in this example is by the way a beautiful example of how > stupid SQL syntax can get, with or without PERCENT. > > SELECT TOP 25 [ PERCENT ] book_name, cost, date > > FROM book_information > > ORDER BY cost DESC; > > This is non-sense. ORDER BY is defined as a result *presentation* clause, > and here (and in many othre dialects) it is overloaded with a result > definition role. > > What then if I want the 25 most expensive books, but ordered by date?
I think your "agreement" with Lefteris here is on the correctness, not the intuitiveness of the syntax (the only thing I care about in this discussion). Despite that, we're discussing the SAMPLE operator here, which in a way has the same oddities as TOP or LIMIT, so your same arguments apply for it here.
signature.asc
Description: Digital signature
_______________________________________________ Checkin-list mailing list [email protected] http://mail.monetdb.org/mailman/listinfo/checkin-list
