fbpx
32 C
Lahore

MySQL: How to duplicate a row using SQL ?

Must read

Ayyaz Zafarhttps://www.ayyaztech.com
I am Full Stack Web Developer with 10 years of professional Experience. I have following Skills: HTML5, CSS3, Javascript, jQuery, Ajax, PHP, MySQL, jQuery, Angular, React.js, Wordpress, Codeigniter, Laravel, Node.js, Mongo DB, Express.js, GraphQL, Typescript, Apollo and many more..

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