SELECT distinct  
tShip.SLineCode,tMoreInfos.ShipPlace  FROM tMoreInfos
   INNER JOIN  tShip 
ON (tMoreInfos.ShipCode=tShip.ShipCode) WHERE SLineCode=1

解决方案 »

  1.   

    SELECT distinct  
    tShip.SLineCode,tMoreInfos.ShipPlace  FROM tMoreInfos
       INNER JOIN  tShip 
    ON (tMoreInfos.ShipCode=tShip.ShipCode) WHERE SLineCode=1
    或者
    SELECT    
    tShip.SLineCode,tMoreInfos.ShipPlace  FROM tMoreInfos
       INNER JOIN  tShip 
    ON (tMoreInfos.ShipCode=tShip.ShipCode) WHERE SLineCode=1
    Group by tShip.SLineCode,tMoreInfos.ShipPlace
      

  2.   

    select a.SLineCode,b.ShipPlace  FROM tMoreInfos b,tShip a where a.shipCode=b.shipCode 
      

  3.   

    select distinct tShip.SLineCode,tMoreInfos.ShipPlace  
        FROM tMoreInfos
        INNER JOIN  tShip 
        ON (tMoreInfos.ShipCode=tShip.ShipCode) 
        WHERE SLineCode=1
      

  4.   

    SELECT distinct tShip.SLineCode,tMoreInfos.ShipPlace FROM tMoreInfos JOIN  tShip ON tMoreInfos.ShipCode=tShip.ShipCode WHERE SLineCode=1或:SELECT tShip.SLineCode,tMoreInfos.ShipPlace FROM tMoreInfos JOIN  tShip ON tMoreInfos.ShipCode=tShip.ShipCode WHERE SLineCode=1 group by tShip.SLineCode,tMoreInfos.ShipPlace