Update column A in table X based on the value of column A in table Y

0

On a SQL server 2012 I have to do a massive update (record by record) of a column A in table X based on the value that same column has in table Y. The key is a serial number, How can I do this?

    
asked by Guillermo E. Grillo 20.12.2018 в 21:18
source

1 answer

1

According to comments, this would be the query:

UPDATE tx SET tx.A=ty.A
FROM x AS tx
INNER JOIN Y AS ty
ON tx.Key=ty.Key
    
answered by 20.12.2018 в 21:29