View previous topic :: View next topic
|
Author |
Message |
rajkan24
New User
Joined: 21 Feb 2005 Posts: 6 Location: India
|
|
|
|
hi friends,
Have a nice day to you all.
I have one doubt in db2. Can anyone help me.
Question:-
In a Table there are many duplicate records. I want to delete the duplicate records, at the same time i want to maintain each one copy in that duplicate records. I want to know the query for this.would you please help me?????????. bye.
Rajesh. |
|
Back to top |
|
|
khannay2k
New User
Joined: 24 Feb 2005 Posts: 28 Location: Bangalore
|
|
|
|
[color=darkblue][/color]
Hi Rajesh,
rajesh here again.
this is the syntax to remove the duplicates.
[b]Delete From Table1Where Id In (Select Id From Tabel1 As Temp Group By Id Having Count(*) >1) [/b]
Khanna |
|
Back to top |
|
|
rajkan24
New User
Joined: 21 Feb 2005 Posts: 6 Location: India
|
|
|
|
hi khanna,
thanks for your reply.Are sure with ur query?.Did u check it whether its working or not?.please reply bye.
regards,
R.Rajesh. |
|
Back to top |
|
|
|