Re-Indexing MySQL INT Primary Keys & Reset AUTO_INCREMENT

后端 未结 2 784
再見小時候
再見小時候 2021-01-14 18:26

So I have a MySQL database that I\'m using with a PHP site. Over the course of weeks of development, I\'m left with something like:

Table: users

id  | name         


        
2条回答
  •  北荒
    北荒 (楼主)
    2021-01-14 18:39

    Why do you need to change the order of the names in the database? You can just add an ORDER BY name clause on your sql query to get the results in alphabetical order by name.

提交回复
热议问题