create table #t1 (productNo tinyint, productname varchar(10),Des varchar(50), quantity tinyint)Insert into #t1select 1, 'borin', '4x-mal', 2 union allselect 1, 'borin', '5x-cal', 3 union allselect 2, 'hypoid', '4-5cal', 4 union allselect 2, 'hypoid', '4-5cal', 4 ---;with cte as ( select row_Number() over (partition by productNo, ProductName order by quantity desc /* arbitrary */) AS COLUMN1, * FROM #T1)DELETE FROM CTE WHERE COLUMN1>1select * from #t1drop table #t1