Tuesday, January 12, 2016

Update Table B with Row Data from Table A... I always forget the Syntax

SQL: I have to perform this only when I've forgotten how.  So, alas, I'm writing it down.

UPDATE tableB 
SET tableB.col1 = tableA.col1, 
tableB.col2 = tableA.col2,
...
FROM tableA, tableB 
WHERE tableA.MapId = tableB.MapId

No comments:

Post a Comment