sql insert question/mlml

From: Michel Lee <ae299_at_FreeNet.Carleton.CA>
Date: 1997/05/02
Message-ID: <5kc0b7$mcv_at_freenet-news.carleton.ca>#1/1


[Quoted] I will try to post this question since i am not sure where else to post. If this is the wrong newsgroup, then pls let me know.

Question: I'd like to copy an existing row from a table into the same table, but with the primary key's value increased by 1. How can I do that without specifying all the fields in the statement (there are many fields in this table)? I cannot do

insert into foo

   select * from foo where keyfield = 100

since there is a unique key in 'foo'

i am stumped, your help is apprecreated.

mike

--
    /-----------------------------------------------/ \--\--\  \-- \-- \--
   /             www.ncf.carleton.ca/~ae299        /---\  \  \ \\   \   \
  /             ae299_at_freenet.carleton.ca         /-----\     \ \\-- \-- \--
 /-----------------------------------------------/
Received on Fri May 02 1997 - 00:00:00 CEST

Original text of this message