MySQL, ORDER BY insertion order, no sorting columns

后端 未结 4 1114
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-11 16:02

How can I order values from a table, ascending from the time they were inserted. There is no special column for this matter, like a timestamp or autoincrement.

I kno

4条回答
  •  伪装坚强ぢ
    2020-12-11 16:18

    Depending on the data in the table, you may be able to order by the id of the data - if the data has a single incremental integer to assure PK uniqueness. There is no other way to sort on insertion order unless the data is captured and recorded in the table.

    I don't know of anything in MySQL that retains extra (meta) information on records that you have not specified at the table level.

提交回复
热议问题