Quantcast
Channel: MySQL Forums - Microsoft SQL Server
Viewing all articles
Browse latest Browse all 686

SQL Server Triggers - MySQL Triggers (Auto Incrementing/Insert friendly) (no replies)

$
0
0
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.

Viewing all articles
Browse latest Browse all 686

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>