Search This Blog

Friday, July 20, 2012

Update table join SQL Server

SQL Server > Update > Using Join


UPDATE
  tbl1 AS A
  INNER JOIN tbl2 AS B ON A.F1=B.F1
SET

  A.X = 1,
  A.Y = 2
WHERE
  A.id = 100