Answer the question
In order to leave comments, you need to log in
How to build an update query in postgressql?
I sometimes have the following entries in my database: city | ('JACKSONVILLE',) - you need to remove the brackets so that the result is - city | JACKSONVILLE
how to write such an update request?
Answer the question
In order to leave comments, you need to log in
update table_name set column_name = 'city | JACKSONVILLE'
where id in (select id from table_name where column_name = 'city | (''JACKSONVILLE'',)')
where ... like '%JACKSONVILLE%'
, but be sure to check that there is no 'JACKSONVILLE', 'BLAH2' , etc. there. update table_name set column_name = 'city | JACKSONVILLE'
where id in (...)
, ...
is a list of row IDs to be updated, separated by commas, for example 1,3,8
.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question