Postgres update with an inner join across 2 tables? Postgres update with an inner join across 2 tables? postgresql postgresql

Postgres update with an inner join across 2 tables?


UPDATE    animal_attribute_values aavSET    animal_attribute_value_name = 'Some new value'FROM animals aaWHERE aa.animal_id = 458AND aa.animal_attrib_value_id = aav.animal_attrib_value_id  ;


are you asking something like this right..?

update  animal_attribute_values aavset  aav.animal_attribute_value_name = 'Some new value'where aav.animal_attrib_value_id in (select a.animal_attrib_value_id where a.animal_id=458)

try this..