fbpx
31 C
Lahore

MySQL: How to duplicate a row using SQL ?

Use following SQL query to duplicate any single row. Use your own field names to make this working in your case.

insert into packages (`field_1`, `field_2`, `field_3`, `field_4`) 
select `field_1`, `field_2`, `field_3`, `field_4` from packages where id=1

 

- Advertisement -spot_img

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article