select * from ( SELECT *  FROM  specificationorder s   where  s .So_NO in(100520093344531,100520101601139) )  where  specificationorder.so_productcode='C08001001001001' 

解决方案 »

  1.   

    SELECT * FROM specificationorder where So_NO in(100520093344531,100520101601139) and so_productcode='C08001001001001' ;
      

  2.   

    select * from ( SELECT * FROM specificationorder s where s .So_NO in(100520093344531,100520101601139) ) a
    where specificationorder.so_productcode='C08001001001001'
      

  3.   

    select * from ( SELECT * FROM specificationorder s where s .So_NO in(100520093344531,100520101601139) ) a
    where so_productcode='C08001001001001'or SELECT * FROM specificationorder s where s .So_NO in(100520093344531,100520101601139) and specificationorder.so_productcode='C08001001001001'
      

  4.   

    [SQL] select * from ( SELECT * FROM specificationorder s where s .So_NO in(100520093344531,100520101601139) ) a
    where specificationorder.so_productcode='C08001001001001'[Err] 1054 - Unknown column 'specificationorder.so_productcode' in 'where clause'
      

  5.   

    呵呵,直接用你的SQL了,去掉specificationorder.
    select * from ( SELECT * FROM specificationorder s where s .So_NO in(100520093344531,100520101601139) ) a
    where so_productcode='C08001001001001'
      

  6.   

    SELECT * FROM specificationorder where So_NO in(100520093344531,100520101601139) and specificationorder.so_productcode  in('C08001001001001','C08001001001002')
    这个语句 是不是会不会有问题??、其实我实现的就是要这个效果
      

  7.   


    select * from ( SELECT * FROM specificationorder s where s .So_NO in(100520093344531,100520101601139) )  a  where so_productcode='C08001001001001'
    这个可以用了 
      

  8.   

    没有看到你的记录,贴出来看看,如果上述语句得出的结果 是正确的,SQL语句就没有问题
      

  9.   

     select * from ( SELECT * FROM specificationorder s where s .So_NO in(100520093344531,100520101601139) ) t 
     where so_productcode='C08001001001001' 
      

  10.   

    SELECT * FROM specificationorder where So_NO in(100520093344531,100520101601139) 
    and specificationorder.so_productcode in('C08001001001001','C08001001001002')
    我想就算是正确的 也没有下面的语句好用 结贴了
    select * from ( SELECT * FROM specificationorder s 
    where s .So_NO in(100520093344531,100520101601139) )  a  where so_productcode='C08001001001001'