From: Martijn Tonies Date: January 30 2008 1:14pm Subject: Re: feature request: statement SELECT...(INSERT|UPDATE) :) List-Archive: http://lists.mysql.com/mysql/211139 Message-Id: <021b01c86342$18218360$9902a8c0@martijnws> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit > On Jan 30, 2008 12:50 PM, Dmitry E. Oboukhov wrote: > > Is it possible to add to the syntax of the INSERT operator appoximately > > in such way: > > SELECT list INSERT [IGNORE] INTO ... - an added one. > > SELECT list UPDATE .... - an added one. > > > PS: I understand that adding the changes into a language is a very > > serious question that needs a great discussion but one never can tell, > > may be mysql developers will be interested in my proposal ;) > > I think it would be a good idea to look at the way other databases can > do this and see if there is some common syntax that could also be > implemented by MySQL. For instance PostgreSQL implements a INSERT / > UPDATE / DELETE ... RETURNING ... statement. ISTM that is exactly the > functionality you want, but with a different syntax. If there are no > other (better) competing implementation syntaxes (I don't know any, > but maybe other list members do), I would like MySQL to adopt the > PostgreSQL example. Firebird uses this syntax as well, I believe it's the SQL standard syntax for this feature. Martijn Tonies Database Workbench - development tool for MySQL, and more! Upscene Productions http://www.upscene.com My thoughts: http://blog.upscene.com/martijn/ Database development questions? Check the forum! http://www.databasedevelopmentforum.com