select * from B
where A.thID=B.thID and Price=min(Price)

解决方案 »

  1.   

    select * from B
    where exists (select thID from A where A.thID=B.thID) and Price=min(Price)
      

  2.   

    select * from a inner join b on  A.thID=B.thID where B.Price=min(b.Price)
      

  3.   

    另:好像PRICE 为保留字应用[price]
      

  4.   

    SELECT min(price) FROM B where A.ThID = B.ThID
      

  5.   

    select * from B
    where A.thID=B.thID and B.Price in (select min(B.Price) as p from B where A.thID=B.thID)
      

  6.   

    select * from b
    where a.thid=b.thid and min(price)

    select * from b inner join b
    on (a.thid=b.thid)
    and min(b.price)

    select * from b inner join b
    using(thid)
    and min(b.price)

    select * from a natural inner join b
    where b.price=min(b.price)
      

  7.   

    select * INTO #TEMP from a inner join b on  A.thID=B.thID 
    SELECT MIN(#TEMP.PRICE) FROM #TEMP
      

  8.   

    Select Min(B.Price) From A,B
    Where A.thID=B.thID
      

  9.   

    select * from b 
    where b.price=(select min(b.price) from a,b where a.thid=b.thid)