View Single Post

  #1 (permalink)  
Old 03-22-2006
Don Vaillancourt
 
Posts: n/a
Default insert into...select using the same table

How can I do the following in MySQL.

insert into table1 (col1, col2, col3)
select col1, col2, somevalue as col3
from table1

MySQL doesn't allow you to select from the same table you are inserting
into.

Thank You
Reply With Quote