Is it possible to create a column that automatically increments in such a way that I can insert values, provide a value for the incremented column and than the rest of the values in that column adjust automatically?
For example, if I have an index column and a data column such that:
INDEX -- DATA
1 -- ONE
2 -- TWO
3 -- THREE
4 -- FOUR
Is there a way to insert (3, NEW THREE) so the result is:
INDEX -- DATA
1 -- ONE
2 -- TWO
3 -- NEW THREE
4 -- THREE
5 -- FOUR
Thanks!
This issue has been solved using SQL Server, but now I need it in MySQL. Look Here.
For example, if I have an index column and a data column such that:
INDEX -- DATA
1 -- ONE
2 -- TWO
3 -- THREE
4 -- FOUR
Is there a way to insert (3, NEW THREE) so the result is:
INDEX -- DATA
1 -- ONE
2 -- TWO
3 -- NEW THREE
4 -- THREE
5 -- FOUR
Thanks!
This issue has been solved using SQL Server, but now I need it in MySQL. Look Here.