search

Home  >  Q&A  >  body text

node.js - I want the data that enters the database last to be displayed first in the foreground. How to do this?

I want the data that enters the database last to be displayed first in the front desk. How to do this?
Because every time I insert data, it is inserted at the end, I wrote it in nodejs;

If you are a beginner, please give me some advice, I will be very grateful!

Please answer

欧阳克欧阳克2755 days ago758

reply all(2)I'll reply

  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-06-12 09:23:10

    Give a time when warehousing, such as createTime. select * from table order by createTime desc

    reply
    0
  • 漂亮男人

    漂亮男人2017-06-12 09:23:10

    When querying, just sort by ID in reverse order.
    When writing SQL

        Select * from Table order by ID desc

    reply
    0
  • Cancelreply