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
Written By : Web Development Institute
Trending Courses

CodeIgniter

Regular : 45 Days

Fastrack : 20 Days

Crash : 10 Days

Advance Digital Marketing Expert Course

Regular : 6 Months

Fastrack : 3 Months

Crash : 2 Months

React JS

Regular : 45 Days

Fastrack : 25 Days

Crash : 15 Days

Laravel

Regular : 45 Days

Fastrack : 20 Days

Crash : 10 Days

Front End Developer

Regular : 6 Months

Fastrack : 4 Months

Crash : 2 Months

Web Expert with Python

Regular : 12 Months

Fastrack : 6 Months

Crash : 3 Months

Request For Demo