Is it possible to duplicate a record in a table into the same table with a changed 
field? I have a single user who now has authority over an additional database. I 
wanted to duplicate the records in myslq.db for this user, changing the Db field to 
the name of the additional database.

I searched the mailing list archives, and found a reference to this quote from the 
INSERT...SELECT manual page:
The target table of the INSERT statement cannot appear in the FROM clause of the 
SELECT part of the query because it's forbidden in ANSI SQL to SELECT from the same 
table into which you are inserting. (The problem is that the SELECT possibly would 
find records that were inserted earlier during the same run. When using subselect 
clauses, the situation could easily be very confusing!) 

It seems to me that this absolutely forbids it. Is there a work around? another method?

[I'm aware that I could have just typed the whole thing in an INSERT statement more 
quickly and with fewer keystrokes that typing this note, but I'm the curious type.]

Thanks for your thoughts.

-Kevin Zembower

-----
E. Kevin Zembower
Unix Administrator
Johns Hopkins University/Center for Communications Programs
111 Market Place, Suite 310
Baltimore, MD  21202
410-659-6139


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to