|
VFP 愛用者社區 本討論區為 Visual Foxpro 愛用者經驗交流的地方, 請多多利用"搜尋"的功能, 先查看看有無前例可循, 如果還有不懂的再發問. 部份主題有附加檔案, 須先註冊成為社區居民才可以下載.
|
上一篇主題 :: 下一篇主題 |
發表人 |
內容 |
jasonheng
註冊時間: 2003-05-06 文章: 1 來自: Malaysia
第 1 樓
|
發表於: 星期三 七月 23, 2003 10:21 am 文章主題: 如何集体update record ? |
|
|
I have two tables: table1 and table2
each table have 2 fields: field1 and field2 as below:
table1
field1 field2
1 A
2 B
3 C
table2
field1 field2
1 1
1 1
2 2
2 2
3 3
3 3
i would like to use SQL update to update table2-field2 data:
update table2 set field2 = table1.field2 where field1 = table1.field1
but it only give me:
table2
field1 field2
1 A
1 A
2 2
2 2
3 3
3 3
i want ALL record to be updated. What should i do ? Kindly please advice.
Thank you very much.
the result i want is:
table2
field1 field2
1 A
1 A
2 B
2 B
3 C
3 C
Note: execute with one query only. |
|
回頂端 |
|
|
|
|
您 無法 在這個版面發表文章 您 無法 在這個版面回覆文章 您 無法 在這個版面編輯文章 您 無法 在這個版面刪除文章 您 無法 在這個版面進行投票 您 無法 在這個版面附加檔案 您 無法 在這個版面下載檔案
|
|