I
I
ILoveYAnny2016-09-28 09:26:08
PostgreSQL
ILoveYAnny, 2016-09-28 09:26:08

How can I move the value of all cells from column A to column B?

Hello, I use PgAdmin 3, I also have access to the console, I also didn’t find anything in the PgAdmin interface, of course you can copy and paste one by one value, but I have 1055 of them. mirror replace table B with values ​​from column A. Mb where there is an option in PgAdmin3 or SQL query.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
ILoveYAnny, 2016-09-28
@ILoveYAnny

UPDATE table SET column1=column2

S
Sergey Gornostaev, 2016-09-28
@sergey-gornostaev

insert into dest_table_name (column_name)
    select column_name from src_table_name;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question