select * from table b where (select sum(je) from table where cid<=b.cid) <= 65为什么换成:delete from table b where (select sum(je) from table where cid<=b.cid) <= 65就不可以了呢,提示有语法错误请问这句delete 该如何改写才能满足条件,但又不会有语法错误呢,谢谢

解决方案 »

  1.   

    delete b from .................
      

  2.   

    delete   b   where   (select   sum(je)   from   table   where   cid <=b.cid)   <=   65 
      

  3.   

    楼上2位的意思是说:delete from table where (select sum(je) from table where cid <=table.cid) <= 65就可以了吗??? 为什么delete就不需要别名b了呢??
      

  4.   


    delete t
    from t a
    where (select   sum(je)   from   t where   cid   <=a.cid)   <=   65 
      

  5.   

    delete 语句中的  from 子句不能用别名!   
      

  6.   

    delete  b  from   table   b   where   (select   sum(je)   from   table   where   cid <=b.cid)   <=   65