语句

update jigou_temp t set t.area=
(select z.code from zipcode z
where substr(t.shi,0,2) = substr(z.city,0,2) and substr(t.quxian,0,2) = substr(z.county,0,2) and t.area='999999' and z.type='county'
)
where exists
(select z.code from zipcode z
where substr(t.shi,0,2) = substr(z.city,0,2) and substr(t.quxian,0,2) = substr(z.county,0,2) and t.area='999999' and z.type='county'
)

posted @ 2009-08-11 08:52  super_mario  阅读(85)  评论(0编辑  收藏  举报