oracle用一张表的字段更新另一张表的字段
例如:
表A
name	syncid
曲柳川	UUID:6cf1f800-6c86-11e1-9a08-001f290c49e7
曲柳川	UUID:6cf1f800-6c86-11e1-9a08-001f290c49e7
热电厂	UUID:6d0cabf0-6c86-11e1-9a08-001f290c49e7
热电厂	UUID:6d0cabf0-6c86-11e1-9a08-001f290c49e7
热电厂	UUID:6d0cabf0-6c86-11e1-9a08-001f290c49e7
泡鹿沟	UUID:6cec79c0-6c86-11e1-9a08-001f290c49e7
泡沿	UUID:6ce88220-6c86-11e1-9a08-001f290c49e7
泡沿	UUID:6ce88220-6c86-11e1-9a08-001f290c49e7
泡沿	UUID:6ce88220-6c86-11e1-9a08-001f290c49e7
泡沿	UUID:6ce88220-6c86-11e1-9a08-001f290c49e7
泡沿	UUID:6ce88220-6c86-11e1-9a08-001f290c49e7
泡沿1	UUID:6ceacc10-6c86-11e1-9a08-001f290c49e7
泡沿1	UUID:6ceacc10-6c86-11e1-9a08-001f290c49e7
人民大药房(彩北店)	UUID:6cb53d20-6c86-11e1-9a08-001f290c49e7
人民大药堂	UUID:6d16be10-6c86-11e1-9a08-001f290c49e7
批发市场工商所	UUID:6cbf7650-6c86-11e1-9a08-001f290c49e7
表B
name	syncid
曲柳川	1
热电厂	2
泡鹿沟	3
泡沿	4
泡沿1	5
人民大药房(彩北店)	6
批发市场工商所	7
把表B的syncid 更新成表A的syncid
------解决方案-------------------- update 表B set syncid=(select distinct syncid from 表A where name=表B.name)
 where exits (select 1 from 表A where name=表B.name)
------解决方案-------------------- 探讨