Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In SQLite how do I copy data from one column to another column in the same table?

Tags:

sqlite

In SQLite how to copy data from one column to another column in same database table?

like image 360
ios Avatar asked Jan 29 '11 13:01

ios


People also ask

How do you copy values from one column to another?

Select the row or column that you want to move or copy. In the cell, click where you want to paste the characters, or double-click another cell to move or copy the data. or press Ctrl+V. Press ENTER.

How can I update one column to another column in the same table in SQL?

In such a case, you can use the following UPDATE statement syntax to update column from one table, based on value of another table. UPDATE first_table, second_table SET first_table. column1 = second_table. column2 WHERE first_table.id = second_table.


1 Answers

Try this:

UPDATE tableName SET destinationField = sourceField 
like image 126
Vladimir Ivanov Avatar answered Sep 20 '22 08:09

Vladimir Ivanov