一个sql

来源:互联网 发布:淘宝硬说店铺资质造假 编辑:程序博客网 时间:2024/05/02 13:49
--select *
  --from gj.tab52
update gj.tab52 set code='w1'||code
 
where code like ('100185%'and code not like ('w1100185%')
   
and relateddocstoreid = (select storeid
                              
from gj.tab51
                             
where knowledge = '行政区划'
                               
and class = '通用')
 start 
with relateddoctypeid = 51
        
and relateddocstoreid =
            (
select storeid from gj.tab51 where knowledge = '行政区划')
connect 
by prior storeid = relateddocstoreid;

先记下来 回头看一下 

把update语句和 select 换一下会报错

原创粉丝点击