update t_borrow set fkid=b.noumber from ( select row_number() over (order by PublishTime asc) as noumber,borrowId from t_borrow ) b where b.BorrowId=t_borrow.BorrowId