Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

265
Views
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 answers
Answer question

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 Report

0

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

will do what you try to achieve.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!