hi all ,
I have 3 duplicate rows which are non - unique rows
this is my table in SQL
Name ```` xyz| xyz|`````Need to delete only first 2 rows ,Leave third row. xyz
Thank in advanve
Naveen
hi all ,
I have 3 duplicate rows which are non - unique rows
this is my table in SQL
Name ```` xyz| xyz|`````Need to delete only first 2 rows ,Leave third row. xyz
Thank in advanve
Naveen
basically something like this
delete d
from
(
select *, row_no = row_number() over (partition by somecol order by anothercol)
from sometable
) d
where d.row_no <> 1
specify the column name that you want to be as unique in the partition by
No one has followed this question yet.