How to Copy one column data to another in mysql

In this blog you will learn how to copy one column of data to another column in MySQL, sometimes there is a need to copy data in multiple rows, if we do this manually it will take a lot of time so in this, you will learn how we can do this by the query. Let’s see the following:


Write this code in your PHPMyAdmin SQL or on MySQL:

UPDATE  `table name SET `column2`=`column1` where `id`=1


Example:

UPDATE `posts` SET heading=blogtitle;

Categories: web development mysql

Trending Courses

CodeIgniter

Regular : 45 Days

Fastrack : 20 Days

Crash : 10 Days

Advance Digital Marketing

Regular : 6 Months

Fastrack : 3 Months

Crash : 2 Months

React JS

Regular : 45 Days

Fastrack : 20 Days

Crash : 7 Days

Laravel

Regular : 45 Days

Fastrack : 20 Days

Crash : 10 Days

Front End Developer

Regular : 7 Month

Fastrack : 4 Month

Crash : 2 Month

Request For Demo