读书人

oracle update两张表联系关系更新

发布时间: 2012-07-18 12:05:41 作者: rapoo

oracle update两张表关联更新

更新字段 在mysql 中用习惯了

?

update tb1 a,tb2 b set a.name=b.name where a.id=b.id and a.age=10

?

放到oracle里缺失set关键字

?

改成

update tb1 a set a.name=(select name from tb2 b where a.id=b.id)

?

where a.age=10

读书人网 >PowerDesigner

热点推荐