![]() |
|
|||||||
![]() |
|
|
Thread Tools | Display Modes |
|
#1
IP: 199.115.98.59
|
|||
|
|||
|
Use INSERT ... SELECT:
insert into your_table (c1, c2, ...) select c1, c2, ... from your_table where id = 1 where c1, c2, ... are all the columns except id. If you want to explicitly insert with an id of 2 then include that in your INSERT column list and your SELECT: insert into your_table (id, c1, c2, ...) select 2, c1, c2, ... from your_table where id = 1 You'll have to take care of a possible duplicate id of 2 in the second case of course. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|