List:General Discussion« Previous MessageNext Message »
From:Egor Egorov Date:May 19 2004 5:47am
Subject:Re: insert into table select ...
View as plain text  
Gaspar Bakos <gbakos@stripped> wrote:
> 
> I am trying to duplicate a row of a table in the following way:
> 
> insert into Observer select * from Observer where OBid = 4;
> ERROR 1066: Not unique table/alias: 'Observer'
> 
> It is a unique table; I mean there can't be another table named in the
> same way.
> 
> Any pointer would be welcome. Probably trivial, but got stuck.

Before version 4.0.14 you can't insert data in the same table as you use in the FROM
clause of the SELECT part.



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   Egor.Egorov@stripped
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com



Thread
insert into table select ...Gaspar Bakos19 May
  • Re: insert into table select ...Egor Egorov19 May