Hi Dag, Thank you for your input. :) I think it's perfect as it is then. If the standard is clear and strict like that, then I'm all for keeping it the way it is.
Tiago On Mon, Apr 27, 2009 at 9:51 PM, Dag H. Wanvik <[email protected]> wrote: > > Hi Tiago, > > thanks for testing this new feature! > > Tiago Espinha <[email protected]> writes: > > > The question is about the following SQL statement: > > select * from t1 fetch first 0 rows only; > > According to the latest SQL standard draft that I've been able to see, > this should give an error, cf. section 7.13 (quote): > > 7.13 <query expression> > > General Rules > : > 8) If <fetch first clause> is specified, then: > a) Let OCT2 be the cardinality of T. > > NOTE 212 - OCT2 is the cardinality of T after the removal of any > rows from T by the application of the prior General Rule. > b) Case: > > i) If <fetch first row count> is specified, then let FFRC be > the value of <fetch first row count>. > > ii) Otherwise, let FFRC be 1 (one). > > c) If FFRC is less than 1 (one), then an exception condition is > raised: data exception - invalid row count in fetch first > clause. > > I would have liked the semantics you suggest, but for prudence I think > we should stick with the standard for now. We could always be more > liberal later, it is harder to remove something people already rely > on. > > Dag >
