Hi

> 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.

IIRC, the table you're INSERTing into cannot be the same table you 
SELECT from - you're trying to take records from the table 'foo' and 
insert them into the same table.

> mysql> insert into foo.bar select id from foo.bar;
> ERROR 1066: Not unique table/alias: 'bar'
> mysql>

This error seems to support that idea - although its not a particularly 
friendly way of saying it.  Try creating another table, and do the 
select from that.

Hope this helps!

David P


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to