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;