0

I have 2 tables, in same Database: table1 & table2.

table1 columns = a, b, c, d & table 2 columns = c, d, e, f

I am trying to UPDATE values a, b from e,f using:

UPDATE table1 as t1 
SET t1.a = t2.e, t1.b = t2.f
FROM table2 AS t2 
WHERE (t1.c=t2.c) AND (t1.d=t2.d);

Both matches are MUST. But its giving SQL Error. Any idea, what m doing wrong ?? Thanks in Advance.

Dharman
  • 30,962
  • 25
  • 85
  • 135
luna.romania
  • 309
  • 3
  • 15

0 Answers0