MySQL limit from descending order

前端 未结 4 1400
死守一世寂寞
死守一世寂寞 2020-12-30 23:56

Is it available to write a query to use same \"LIMIT (from), (count)\", but get result in backwards?

In example if I have 8 rows in the table and I want to get 5 row

4条回答
  •  暖寄归人
    2020-12-31 00:10

    This way is comparatively more easy

    SELECT doc_id,serial_number,status FROM date_time ORDER BY  date_time DESC LIMIT 0,1;
    

提交回复
热议问题