I have an address table with auto generated ID column, and this id is referenced in customer table, I cannot perform update operation using the code below
UPDATE mydb.adrs
SET adrs_col1 = _adrs_col1,
adrs_col2 = _adrs_col2
FROM mydb.adrs AS ad
JOIN mydb.customer AS cu
ON ad.adrs_id = cu.adrs_adrs_id
WHERE customer_id = _customer_id;
_customer_id is the passed in ID for a customer _adrs_col1 is the passed in Address _adrs_col2 is also the passed in Address (this is second address)