duplicate rows [message #375788] |
Sun, 14 December 2008 13:01 |
kang
Messages: 89 Registered: November 2007
|
Member |
|
|
what's the best way of duplicate row(s) that is/are only different from certain columns(probably keys)?
TIA.
|
|
|
|
|
Re: duplicate rows [message #375849 is a reply to message #375845] |
Mon, 15 December 2008 03:04 |
Frank Naude
Messages: 4581 Registered: April 1998
|
Senior Member |
|
|
Assume "id" is a primary key. You can reassign "id" values (possibly with a sequence) with something like this:
INSERT INTO t1 SELECT id+1000, c1, c2, c3 FROM t1;
|
|
|