0
I have a table with a column called ID
. That one ID
is neither Auto Increment nor primary key, but follows a numerical sequence (e.g.: 1, 2, 3, 4, 5...).
I need the include or to the delete in a variable position, recalculate the Ids and do the update
. Example:
- if DELETE ID 2, the next Ids are subtracted 1. Where the
3
had seen the2
,4
flipped3
, etc..
The same thing when INCLUDE in a variable position. Any idea how to do?
Could you translate the question into English?
– rray
Mike, welcome to [en.so]! Translate the question to Portuguese it will be reopened. Hug.
– utluiz
Which set of data?
– gmsantos
What is this for? It will include unnecessary complexity in your application. Think about the cost of moving, say, 10 million records several times a day because of this.
– Tiago César Oliveira
@Ike you could justify this behavior so that we can help you ?
– Fábio Lemos Elizandro
This table is a foreign key in some other table !? Reordering would lose the link. Is there any strong reason not to have "toothless" in this table ? Outside.
– Motta