update table as t1 set prevID = (select max(t2.id) from table as t2 where t2.id.id )
https://www.sql.ru/forum/1317319/predydushhee-id