Subject Insert select from and SQL standard
Author grostoon
Hello everybody,

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,

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

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


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

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