回答

收藏

更新另一个表中的数据

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

我需要在另一个表中更新一些数据。+ v6 t0 D; z. T0 f- ^
我只想简单地将数据从表1数据col1到表2的col1.行位于同一位置,所以没有必要做任何事情ID比较工作。" w  d9 v- g1 p
我怎样才能做到这一点?& E3 w3 J: ?2 |; O
-----------------------------------------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因一些奇怪的原因而崩溃。0 ]' K. v( A& u/ y* _
我也应该提到Table1位于另一个数据库中。我不确定这是否重要..但是很好.. ! m) D+ h' h) p6 l
提前致谢!
" S: k7 |9 u7 m* O! b' g                                                               
' K; E9 s' S+ E9 y* Z    解决方案:
分享到:
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则