Обсуждение: Remove ROW | ROWS from OFFSET and FETCH
Hi, I was wondering if it might be worth making ROW/ROWS optional for OFFSET and FETCH clauses? And can ONLY be optional too? So: OFFSET start { ROW | ROWS } FETCH { FIRST | NEXT } [ count ] { ROW | ROWS } ONLY Would become OFFSET start [ ROW | ROWS ] FETCH { FIRST | NEXT } [ count ] [ ROW | ROWS ] [ONLY] So instead of: SELECT * FROM my_table OFFSET 4 ROWS FETCH FIRST 10 ROWS ONLY; one could write: SELECT * FROM my_table OFFSET 4 FETCH FIRST 10; The only case where ROW would be mandatory would be for FETCH FIRST ROW ONLY. ...although I suspect I'm missing something obvious or reasonable here ;) Thom
On 3/26/10 2:01 AM +0200, Thom Brown wrote: > I was wondering if it might be worth making ROW/ROWS optional for > OFFSET and FETCH clauses? And can ONLY be optional too? AIUI the only time you'd want to use that syntax is when you want to write (theoretically) portable code, and making parts of the syntax optional is just breaking that portability. We already have a non-portable, non-standard syntax. Regards, Marko Tiikkaja
On 26 March 2010 00:14, Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi> wrote: > On 3/26/10 2:01 AM +0200, Thom Brown wrote: >> >> I was wondering if it might be worth making ROW/ROWS optional for >> OFFSET and FETCH clauses? And can ONLY be optional too? > > AIUI the only time you'd want to use that syntax is when you want to write > (theoretically) portable code, and making parts of the syntax optional is > just breaking that portability. We already have a non-portable, > non-standard syntax. > I understand. If that's the case I'll concede the point. :) Thanks Thom