From: Woody <woo...@su...> - 2007-07-11 21:44:36
|
From: "Leyne, Sean" <Se...@br...> > Dmitry, > >> With this approach, we end with many queries becoming ambiguous, e.g.: >> >> CREATE TABLE T (A INT, B INT); >> SELECT A AS B FROM T WHERE B = 0; > > But this is not ambiguous! I don't think it's ambiguous either. If the field B is not included, then all references to B refer to the alias. If B is included, then the renaming of A to B should throw a duplicate field name error or something like that. At least, that's my opinion of how it should work. I would also be interested in what the SQL spec says about this. :) Woody (TMW) |