Find missing ids in MySql

select t1.id – 1 as missing_idfrom lc_messages t1left join lc_messages t2 on t2.id = t1.id – 1where t2.id is nullorder by missing_id desc

Opublikowano
Umieszczono w kategoriach: Bez kategorii