用于替换PostgreSQL中int数组中的部分值的查询
在PotgreSQL中,如何编写查询来替换int4数组中的某些值 {1,2,10}->{1,2999} {2,3,10}->{2,3999}用于替换PostgreSQL中int数组中的部分值的查询,sql,postgresql,Sql,Postgresql,在PotgreSQL中,如何编写查询来替换int4数组中的某些值 {1,2,10}->{1,2999} {2,3,10}->{2,3999} 这就是我们的目标。似乎您想用999替换10,您可以使用array\u replace array_replace(your_column, 10, 999) 似乎要将10替换为999,可以使用array\u replace array_replace(your_column, 10, 999) 非常感谢你!由于我想更新表,下面的查询似乎要执行upd
这就是我们的目标。似乎您想用999替换10,您可以使用
array\u replace
array_replace(your_column, 10, 999)
似乎要将10替换为999,可以使用
array\u replace
array_replace(your_column, 10, 999)
非常感谢你!由于我想更新表,下面的查询似乎要执行
updatetablesetcolumn=array\u replace(column,10999)代码>非常感谢!由于我想更新表,下面的查询似乎要执行updatetablesetcolumn=array\u replace(column,10999)代码>