私はmysqlを使用しており、テーブル内のすべての行を複製する必要がありますが、id列を複製せず、新しい生成番号にはexが必要です。
私のテーブル
item_db
+------------------------------------------+
| id | name | price | detail |
+------------------------------------------+
| 1 | example | 230 | 3 |
| 2 | power | 110 | 3 |
| 3 | voltage | 1.2 | 4 |
| 4 | example | 240 | 4 |
| 5 | example | 320 | 6 |
| 6 | power | 100 | 4 |
| 7 | power | 110 | 6 |
| 8 | example | 230 | 3 |
| 9 | power | 110 | 3 |
| 10 | voltage | 1.2 | 4 |
| 20 | example | 240 | 4 |
| 21 | example | 320 | 6 |
| 22 | power | 100 | 4 |
| 23 | power | 110 | 6 |
| 24 | example | 240 | 4 |
| 25 | example | 320 | 6 |
| 26 | power | 100 | 4 |
| 27 | power | 110 | 6 |
| 28 | example | 240 | 4 |
| 29 | example | 320 | 6 |
| 30 | power | 100 | 4 |
+------------------------------------------+
複製する必要があります
item_db
+------------------------------------------+
| id | name | price | detail |
+------------------------------------------+
| 1 | example | 230 | 3 |
| 2 | power | 110 | 3 |
| 3 | voltage | 1.2 | 4 |
| 4 | example | 240 | 4 | I need to dup id 1-10 to 101-110
| 5 | example | 320 | 6 |
| 6 | power | 100 | 4 |
| 7 | power | 110 | 6 |
| 8 | example | 230 | 3 |
| 9 | power | 110 | 3 |
| 10 | voltage | 1.2 | 4 |
| 101| example | 230 | 3 |
| 102| power | 110 | 3 |
| 103| voltage | 1.2 | 4 |
| 104| example | 240 | 4 |
| 105| example | 320 | 6 |
| 106| power | 100 | 4 |
| 107| power | 110 | 6 |
| 108| example | 230 | 3 |
| 109| power | 110 | 3 |
| 110| voltage | 1.2 | 4 |
| 20 | example | 240 | 4 |
| 21 | example | 320 | 6 |
| 22 | power | 100 | 4 |
| 23 | power | 110 | 6 |
| 24 | example | 240 | 4 |
| 25 | example | 320 | 6 |
| 26 | power | 100 | 4 | i need to dup 20-30 to 200-210
| 27 | power | 110 | 6 |
| 28 | example | 240 | 4 |
| 29 | example | 320 | 6 |
| 30 | power | 100 | 4 |
| 200| example | 240 | 4 |
| 201| example | 320 | 6 |
| 202| power | 100 | 4 |
| 203| power | 110 | 6 |
| 204| example | 240 | 4 |
| 205| example | 320 | 6 |
| 206| power | 100 | 4 |
| 207| power | 110 | 6 |
| 208| example | 240 | 4 |
| 209| example | 320 | 6 |
| 210| power | 100 | 4 |
+------------------------------------------+
専門家に感謝します。