I need to make a design decision about the database. I need to have a < Em> AUTO_INCREMENT primary key is named ID . By default, each line user (in the web) is charged by id . For example, if the table has 4 records the UI will show the rows in the order of 0, 1, 2, 3 . Now, the user needs to drag & amp; To change the sequence, say the drop line in the UI, Drop User Drag ROM3 and Beef 0. So, the display becomes 3, 0, 1, 2 . This sequence should be continuous in the database. I am thinking about how to design a database table to make it continuous and scalable. My first thought is that each row contains a " sequence < / Strong> "field that shows the display sequence. By default, the value should be similar to id when selecting data from the database for the display, instead of ID < The rows climbing on the strong> sequence are sorted, if the sequence changes, then it is updated to the new value. The result is that there may