Home > database >  Insert into the select insert a number of changes
Insert into the select insert a number of changes

Time:11-07

Insert into the select name, id from XXX
Need to insert in the id a found out the maximum value in the table and then increase the number of back, there are one hundred or so

CodePudding user response:

Maximum is 100, for example, the data you need is 101102 one plus one

CodePudding user response:

Mysql is a similar essentially row_number functions, should be able to get the things you said

CodePudding user response:

Version 8.0 + to support, the following version 8.0 SQL implementation, the need to write a little bit complicated

refer to the second floor the rain stopped reply:
mysql has a similar essentially row_number functions, should be able to get the things you said

CodePudding user response:

Mysql5.7 has this feature, the id field with the workbench alter table function of AI, is to realize the increase, and insert need not to value, since the increase,
  • Related