updating columns with a sequence number mysql

后端 未结 3 1311
梦谈多话
梦谈多话 2020-12-01 01:35

I have a table with the columns: (this is only an example I have 50K records)

Name,   Number

Joe     Null
Michael Null
Moses   Null

I to u

3条回答
  •  没有蜡笔的小新
    2020-12-01 01:52

    You could try setting the Number to AUTO_INCREMENT so the numbers will be generated:

    ALTER TABLE your_table MODIFY Number INT AUTO_INCREMENT
    

    Other than that, you probably need: a) stored routines b) application code

提交回复
热议问题