How can I reorder rows in sql database

后端 未结 14 1830
忘了有多久
忘了有多久 2020-11-28 03:24

Is it possible to reorder rows in SQL database? For example; how can I swap the order of 2nd row and 3rd row\'s values?

The order of the row is important to me since

14条回答
  •  执念已碎
    2020-11-28 03:31

    As others have stated use an order by.
    Never depend on the order data exists in a physical table, always base it of the data you are working with, be it one or more key fields.

提交回复
热议问题