delete from user where uid in(
select uid from (
    select uid as xiaojian from user 
    where (uid between 81 and 96) 
    having xiaojian<91 )
as temp );
为什么所有的数据都被删除了。。求大神回复啊。

解决方案 »

  1.   


    select uid from (
        select uid as xiaojian from user 
        where (uid between 81 and 96) 
        having xiaojian<91 )
    as temp查询下看这个的结果是不是所有的值都包含了
      

  2.   

    报错,但是查询select uid as xiaojian from user 
        where (uid between 81 and 96) 
        having xiaojian<91 )有结果,不包括全部啊
      

  3.   

    单独执行这个能跑么? 明显不能的嘛 !!!!!!!
    select uid from (
        select uid as xiaojian from user 
        where (uid between 81 and 96) 
        having xiaojian<91 )
    as temp