select t.rowno, t.EmpID, t.Salary into #temp from
(
select row_number() over(partition by EMPID order by EmpID) as rowno, empID, Salary
from ActualTable
) as t
select * from #temp
update ActualTable
set Sequence = t.rowno
from #temp as t
inner join ActualTable as a on a.empID = t.empID and a.Salary = t.Salary
drop table #temp