How can I reorder rows in sql database

后端 未结 14 1831
忘了有多久
忘了有多久 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:49

    Use ORDER BY in your SELECT query. For example, to order by a user's last name, use:

    SELECT * FROM User ORDER BY LastName
    

提交回复
热议问题