本帖最后由 upldel 于 2011-05-27 11:26:30 编辑

解决方案 »

  1.   


    SELECT distinct stock.st_gc as 库存工厂,gc as 基础工厂 
    from stock left join isgc on (stock.st_gc=isgc.gc)
    and gc is null
      

  2.   


    SELECT distinct stock.st_gc as 库存工厂 
    from stock left join isgc on (stock.st_gc=isgc.gc)
    where gc is null
      

  3.   


    SELECT distinct stock.st_gc as 库存工厂,gc as 基础工厂 from stock left join isgc on (stock.st_gc=isgc.gc)  where gc is null --加这个条件就可以啦
      

  4.   

    SELECT
     distinct stock.st_gc as 库存工厂 
    from
     stock left join isgc on stock.st_gc=isgc.gc
    where
     gc is null