Thursday, February 11, 2010

T-SQL UPDATE with FROM

I'm putting the following query here where I can find it again...it basically shows how the T-SQL "UPDATE" statement works with the FROM option. It's from a response to an old newsgroup post of mine -- thanks to David Pendleton!

UPDATE dest
SET accountNumber = src.ACCT
FROM Vendor dest
INNER JOIN zCustomer src on dest.[name] = src.CUNA

No comments: