Hey there
I have a table and would like to update a row in it with a row from another table. Both tables have the same headers. Can this work?
I am new here and hope for a quick response!
Thanks a lot!
Hey there
I have a table and would like to update a row in it with a row from another table. Both tables have the same headers. Can this work?
I am new here and hope for a quick response!
Thanks a lot!
You can use update statement using Join:
update A.ColName=B.ColName from Table1 A, Table2 B where A.PK=B.FK and
OR
UPDATE **
** t1
SET **
** t1.c1 = t2.c2,
** t1.c2 = expression,**
** … **
FROM **
** t1
** [INNER | LEFT] JOIN t2 ON join_predicate**
WHERE **
** where_predicate;