0
Greetings.
I’m a beginner in the database and wanted to know the correct way to remove an item from the table and update the identification number of the others. This is the typical novice problem, that when removing the item it defaults the entire table because the Ids jump from 1, 2, 3 to 5, this is because Row 4 has been deleted.
Note: my application is C# and I use Npgsql to make the connection with Postgresql.
simply does not update, the key is generated at the time of insertion and it makes no sense to change it. It’s no problem having those numbers skipped over in the ID
– Rovann Linhalis
By the way, it would be a problem if you upgrade ID 5 to 4, for example.
– Alisson
imagine having 1000000 records and deleting the number 2... rsrs
– Rovann Linhalis