• Using CTE, you can select, update and delete specific record(s). Pls refer the below code

    create table #temp (id int)

    --delete #temp

    insert into #temp values(1)

    insert into #temp values(2)

    insert into #temp values(3)

    insert into #temp values(4)

    insert into #temp values(5)

    select * from #temp

    ;with cte (id,r_num)

    as(

    select *,ROW_NUMBER() over(Order by getdate()) from #temp

    )

    delete cte where r_num = 3;

    select * from #temp

    ;with cte (id,r_num)

    as(

    select *,ROW_NUMBER() over(Order by getdate()) from #temp

    )

    update cte set id = 1000 where r_num = 2;

    select * from #temp

    drop table #temp

    Thanks

    Gopi