Is not identifier resolution (search in the current scope first then step out) part of the SQL standard? Damn closed standards and their inability to check without paying through the nose.
Even if not, and this is in fact undocumented, I would be amazed if it changed, purely for the sheer amount of software it would break. > On 28 Dec 2019, at 8:19 am, Simon Slavin <slav...@bigfraud.org> wrote: > > On 28 Dec 2019, at 3:46pm, x <tam118...@hotmail.com> wrote: > >> In the embedded select it takes c from the outer table t1 but doesn’t flag >> ‘ambiguous column’ for b in the embedded select. Is it standard that tables >> at the same level are searched first for the column and tables from the >> surrounding levels are only searched if it’s not found? > > Undocumented. Therefore even if someone told you the what's done now, it > might change in some future version of SQLite. Either using a different > level, or deciding to report the ambiguity. > > To make your code dependable, instead of "b" specify "t1.b" or "t2.b", as you > did in your WHERE clause. This will ensure that your code is understood > correctly by SQLite, and it will also help anyone who has to read your code > in the future. > _______________________________________________ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users