|
From: Arno B. <fbd...@ab...> - 2007-07-25 13:59:38
|
Hi, >> > What you mean in "this is accordingly to the SQL specification"? >> > AFAIR, the spec allows table aliases in UPDATE and DELETE. >> >> In the spec, both UPDATE and FOR UPDATE contain a <column list> >> syntactical element which is different from <column reference>. > > What if in the FOR UPDATE OF <column list> the statement has a self > referencing table JOIN and similarly named columns are repeated? If i understand correctly in the standard only 1 table is allowed and indeed as Dmitry said no alias is allowed. But i see no problem in adding alias support, because it is "something extra" to the standard. Previously (before SQL200n) the alias/correlation name in the update was also not allowed: Before SQL200n: "UPDATE <table name> SET ..." was SQL200n and beyond: "UPDATE <table name> [[AS] <correlation name>] SET ..." I'm not sure if it was in the final SQL2003 or in the next version, but in the most recent drafts. The alias is there. > I much prefer the <column reference> because it allows the table alias to be > taken into consideration which helps to distinguish which relation a column > is a part of. > > Isn't it true that <column list> is a subset of <column reference>? No, but i don't see a problem in using <column reference> here. > Also, isn't it possible that a <column list> is actually a list of > individual <column reference> items? No. Regards, Arno Brinkman ABVisie -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Firebird open source database with many powerful SQL features: http://www.firebirdsql.org http://www.firebirdsql.info General database developer support: http://www.databasedevelopmentforum.com Support list for Interbase and Firebird users: fir...@ya... Nederlandse firebird nieuwsgroep: news://newsgroups.firebirdsql.info |