Home » SQL & PL/SQL » SQL & PL/SQL » duplicate rows (10g, 9i, 11g)
duplicate rows [message #375788] Sun, 14 December 2008 13:01 Go to next message
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 #375793 is a reply to message #375788] Sun, 14 December 2008 13:56 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Explain your question, maybe with an example.

Regards
Michel
Re: duplicate rows [message #375845 is a reply to message #375788] Mon, 15 December 2008 02:43 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Yes - are you looking to create or remove duplicate rows?
Please provide an example of your problem.

[edited for spelling]

[Updated on: Mon, 15 December 2008 02:47]

Report message to a moderator

Re: duplicate rows [message #375849 is a reply to message #375845] Mon, 15 December 2008 03:04 Go to previous message
Frank Naude
Messages: 4502
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;
Previous Topic: Difference between first reading and second reading?
Next Topic: Update multiple rows in a column
Goto Forum:
  


Current Time: Sat Dec 10 13:13:17 CST 2016

Total time taken to generate the page: 0.13893 seconds