select a.*,b.* from selltable a
inner join buytable
on productname=name and price between lowprice and highprice

解决方案 »

  1.   

    select a.*,b.* from selltable a
    inner join buytable b
    on productname=name and price between lowprice and highprice
      

  2.   

    select a.* from SellTable a , BuyTable b where a.id = b.id
      

  3.   

    select * from selltable,buytable where selltable.price between buytable.lowprice and buytable.highprice and selltable.productname=buytable.name
      

  4.   

    这要写个语句块的
      delcate @lowprice  float
            @highprice floatselect @lowprice = lowprice,@highprice = highprice from BuyTableselect * from selltable where price > @lowprice and price < @highprice
    没有查询验证,就是这个意思,你可以照写一个
      

  5.   

    select * from SellTable s 
    where exists (select 1 from BuyTable where name = s.productname and lowprice >100)
      

  6.   

    select a.* from SellTable a , BuyTable b where a.id = b.id and price between lowprice and highprice
      

  7.   

    先谢谢大家,我现在想知道当多个用户(用户数量>100,每个用户在在求购表中的记录>300条)同时做这个操作的时候,会对服务器产生多大的影响,如果用户数量更多,记录也成几何基数增长,这样的操作合适吗