Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

266
Visualizações
Update empty column with Data from two other columns all varchar/text Postgresql

I have 2 columns named type1 & type2 in a table with the name table1 i need to populate their data to my newly created column models but not just to retrieve their data via query but to actually populate the new column "table1".models

at the moment i can have what i want with the following query

select concat("table1".type1,' ',"table2".type2) as models
from "table1";

I need an update column models command to actually populate the newly created column models in postgres.

Thank you.

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

first alter table and add new column like this

ALTER TABLE table1 ADD type3 VARCHAR(100) NULL

then update table like this

update table1 set type3 = concat(type1,' ',type2)
over 4 years ago · Santiago Trujillo Relatório

0

update table1 set models = concat(type1,' ',type2)

will do what you try to achieve.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda