Documentation on SELECT statements at
http://www.sqlite.org/draft/lang_select.html has now been updated and
amplified.


On Thu, Jan 30, 2014 at 5:52 AM, Zsbán Ambrus <amb...@math.bme.hu> wrote:

> Hi!
>
> I'm writing to you about the syntax diagram that appears on
> "http://sqlite.org/draft/lang_select.html";, and is a draft for the
> next version of sqlite (3.8.3).  I find this diagram confusing, and
> would rather prefer to have something similar to
> "http://sqlite.org/lang_select.html";, only of course updated to show
> the syntax changes in 3.8.3.
>
> I have two concrete problems with this diagram.
>
> 1. It seems to imply that LIMIT clauses are attached to each part of a
> compound select.  For example, in a select statement like this:
>
>     SELECT col1 FROM tbl1 UNION ALL SELECT col2 FROM tbl2 ORDER BY 1 LIMIT
> 5;
>
> does the LIMIT clause cause sqlite3 to limit the result of the whole
> compound statement, or does it ask only to limit the tbl2 branch and
> then take the union?  The text of the page later appears to imply that
> the LIMIT applies to the whole statement (correct me if I'm wrong
> here), but the new syntax diagram really seems to show the opposite.
>
> 2. This diagram for select too big.  The diagram in the released docs
> is broken down to smaller parts, and I find that easier to read.
>
> In fact I don't like to read diagrams like this at all.  I'd be
> happier to read an alternate representation of the grammar without
> images, using only a bnf-like text description.  I'm not saying the
> images should go away, only that a text representation should also be
> available somewhere, possibly on a separate page like
> "http://sqlite.org/draft/syntaxdiagrams.html"; if you don't want them
> on the main pages.
>
> That said, there is at least one change I like in the new diagram.
> Namely, the grammar rule single-source is renamed to
> table-or-subquery, and I think the new name is clearer, so thank you
> for that.
>
> Thank you for your work on improving sqlite3,
>
> Ambrus
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to