How to copy a row and insert in same table with a autoincrement field in MySQL?

后端 未结 13 1075
旧时难觅i
旧时难觅i 2020-11-29 15:55

In MySQL I am trying to copy a row with an autoincrement column ID=1 and insert the data into same table as a new row with

13条回答
  •  悲&欢浪女
    2020-11-29 16:31

    If you're able to use MySQL Workbench, you can do this by right-clicking the row and selecting 'Copy row', and then right-clicking the empty row and selecting 'Paste row', and then changing the ID, and then clicking 'Apply'.

    Copy the row:

    Paste the copied row into the blank row:

    Change the ID:

    Apply:

提交回复
热议问题