Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
gautham.gn
Starting Member
19 Posts |
Posted - 2013-12-23 : 07:57:18
|
We have two tables with names X and Y.X has a,b columns. And Y has c,d columns.I want to update b column in X table with the values from d column in Y table on condition X.a=Y.c.Can u help me with this query??Thanks,, |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2013-12-23 : 08:06:46
|
[code]UPDATE tXSET tX.b = tY.dFROM dbo.X AS tXINNER JOIN dbo.Y AS tY ON tY.c = tX.a;[/code] Microsoft SQL Server MVP, MCT, MCSE, MCSA, MCP, MCITP, MCTS, MCDBA |
 |
|
|
|
|