Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need help with update sql

Status
Not open for further replies.

BRADLEY21

Programmer
Sep 19, 2002
35
US
I am trying to update a field of table1 with a field from table2. something like this..

Update table2 set field1 with (field1 of table2) both tables have a common key to join

Any help would be appreciated
 
Try this:

update table1
set col1 = table2.col1
from table1 join table2
on table1.keycol = table2.keycol

That should do it.

Good Luck.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top