REARRANGING NUMERICAL NUMBERING IN MYSQL DATABASE
Posted by: wesonga (105.160.96.---)
Date: September 09, 2019 10:01AM

Hi is there a way that a can reorganize my mysql database after deleting some items? e.g i had an item no. 1,2,3,4,5,6,7,8,9,10. and then i deleted 2,6,9. Can the remaining items be rearranged in numerical order again?

Options: ReplyQuote
Re: REARRANGING NUMERICAL NUMBERING IN MYSQL DATABASE
Posted by: RiggsFolly (Moderator)
Date: September 09, 2019 10:24AM

You do not need to.
When you get to understand databases more you will see that in fact it can be dangerous, and you woudl not want to do it

Once you start linking tables together using these autoincrement id columns (Foreign keys) were you to change them after creation you would first have to check all the subordinate tables to change the linked rows.

Basically there is no need to do this and it can be dangerous to even consider it

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.1.8 32bit & 64bit)
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.16>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your MySQL databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote


Sorry, only registered users may post in this forum.