with 表名 as 用法

select * from xiaolin_erp_pan
for update

delete xiaolin_erp_pan
  
select liao,cang,chu,pi,qty,(select ima01 from ima_file where imaud01 = liao and imaacti = 'Y') from xiaolin_erp_pan

delete xiaolin_erp_pan where liao in (select liao2 from xiaolin2)
 

with ttt as
(  select imaud01,count(ima01) t from ima_file
    where imaud01 in (select liao from xiaolin_erp_pan)
      and imaacti = 'Y'
    group by imaud01
)
select imaud01,t from ttt where t>1




create table xiaolin2(
  liao2 varchar(100) not null
  );
 
select * from xiaolin2
for update
  
delete xiaolin2


版权声明:本文为linjielong88原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。