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 |
|
magic-support.nl
Starting Member
2 Posts |
Posted - 2006-05-27 : 10:50:41
|
| Hello all,I'm new to the group and new with SQL in general.I have a question: I have 2 tables in a database A & BThey have a foreign key named: 'ID' A is a one to many with B.In table A a collumn CD is used. This collumn is alse available in table B. Now I want to change all rows in table B, collumn CD with the value of collumn CD from table A.I've found some instruction like UPDATE etc. but they remind me of using one table.Maybe someone can help me around.Thx Robert |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-05-27 : 20:28:54
|
[code]update bset b.CD = a.CDfrom tableA a inner join tableB bon a.ID = b.ID[/code] KH |
 |
|
|
magic-support.nl
Starting Member
2 Posts |
Posted - 2006-05-28 : 15:13:28
|
| Thx for the help.Will try asap.Robert |
 |
|
|
|
|
|