I think this should be reported as a BUG for version 4.1 Below is a small text retreived from the URL http://www.mysql.com/doc/en/INSERT_SELECT.html
----------- Prior to MySQL 4.0.14, the target table of the INSERT statement cannot appear in the FROM clause of the SELECT part of the query. This limitation is lifted in 4.0.14. ----------- This should apply to 4.1.0 because it is not prior to 4.0.14 !!!!! Thanks Emery ----- Original Message ----- From: "Tedman Leung" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, September 29, 2003 08:08 Subject: insert into x select * from x doesn't work > In mysql 4.1 (and since mysql 4.0.14 or something like that) I believe > it's documented that an insert into X select * from X should work. > > It's not working for me on MySQL 4.1.0 alpha, anyone else have this > problem? is it a bug? I haven't found any other reports of this not > working for anyone else. > > Bellow is a pasted copy of what I get. > > --- > > [1006:[EMAIL PROTECTED]:~]more /proc/version > Linux version 2.4.18-26.8.0 ([EMAIL PROTECTED]) (gcc version > 3.2 20020903 (Red Hat Linux 8.0 3.2-7)) #1 Mon Feb 24 10:21:42 EST 2003 > [1007:[EMAIL PROTECTED]:~]mysql --version > mysql Ver 13.5 Distrib 4.1.0-alpha, for pc-linux (i686) > [1008:[EMAIL PROTECTED]:~]mysql > Welcome to the MySQL monitor. Commands end with ; or \g. > Your MySQL connection id is 3 to server version: 4.1.0-alpha > > Type 'help;' or '\h' for help. Type '\c' to clear the buffer. > > mysql> create database foo; > Query OK, 1 row affected (0.00 sec) > > mysql> create table foo.bar (id int); > Query OK, 0 rows affected (0.08 sec) > > mysql> insert into foo.bar select id from foo.bar; > ERROR 1066: Not unique table/alias: 'bar' > mysql> > > -- > Being normal is vastly over rated : Ted Leung > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] > > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]