回答

收藏

更新另一个表中的数据

技术问答 技术问答 217 人阅读 | 0 人回复 | 2023-09-12

我需要在另一个表中更新一些数据。. A7 j5 w3 W) j/ z
我只想简单地将数据从表1数据col1到表2的col1.行位于同一位置,所以没有必要做任何事情ID比较工作。
- _+ h5 T; A% @& _我怎样才能做到这一点?
; M5 |- G/ N" {- _$ p1 n-----------------------------------------Db1.Table1 (Take yearModel from this table to update Table3)-----------------------------------------imgid          | int | PK |yearModel      | int |----------------------------------------------------------------------------------Db2.Table2 (Go by this table to update Table3)-----------------------------------------imgid          | int | PK |uploadId       | int | FK (With table3.uploadId) |------------------------------------------------------------------------------------Db2.Table3 (Update this table with the yearModel from table1)-------------------------------------------uploadId        | int | PK |uploadYearModel | int |对不起,我的数据库diagaram“ thingy因一些奇怪的原因而崩溃。
+ @, u0 ]8 A! X我也应该提到Table1位于另一个数据库中。我不确定这是否重要..但是很好.. 3 k1 h2 [+ ^% d+ }0 |
提前致谢!5 l( ^4 y) F4 a  k
                                                               
0 q8 F9 Z  E9 [& `6 `& u# ~    解决方案:
分享到:
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则