Subject Re: [firebird-support] Insert select from and SQL standard
Author grostoon
Ok Martijn, this is what I suspected...

Toon.


Martijn Tonies <m.tonies@...> wrote:
Hi,


> I've got a question concerning "insert select from". What is supposed to
> do a statement like this one : insert into a_table_name select * from
a_table_name (yes, with the same table name) according to the SQL standard ?
> I know this kind of statement has no particular interest; but I ask the
question because I don't
> have the same result using FB, Oracle, PostgreSQL and MySQL :
>
> - With Oracle and PostgreSQL the result is a table with twice the number
of rows and duplicated data,

Correct.

> - With MySQL, the request fails with error : ERROR 1066: Not unique
table/alias: 'a_table_name',

Sounds like an SQL parser error.

> -With FB 1.5 or 2.0, if the table is empty, then the result is an empty
table, else FB loops forever.

Known error.

With regards,

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com



++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://firebird.sourceforge.net and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !

Also search the knowledgebases at http://www.ibphoenix.com

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++




---------------------------------
YAHOO! GROUPS LINKS


Visit your group "firebird-support" on the web.

To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com

Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


---------------------------------




---------------------------------
Yahoo! for Good
Click here to donate to the Hurricane Katrina relief effort.

[Non-text portions of this message have been removed]