Sql

select  * from HouseBuy   where 
           F_Price_From >=@StartPrice and  F_Price_To<=@EndPrice)
应该是可以的吧

解决方案 »

  1.   

    假如两个参数:@StartPrice这个小,  @EndPrice这个大
    select  * from HouseBuy   where 
    (F_Price_From between @StartPrice to @EndPrice)
    and (F_Price_To between @StartPrice to @EndPrice)
      

  2.   

    例如:数据库
       start  end
       100    200输入start end
         50     100
         20     150
         20      200
         120     200 
       200       260  都可以
    但是输入  
        10      99
        201     202  就不行了,怎么写啊?
      

  3.   

    select  * from HouseBuy   where 
               F_Price_From >=@StartPrice and  F_Price_To<=@EndPrice
    数码错误啊
      

  4.   

    例如:数据库
       start  end
       100    200但是输入  
        10      99
        201     202  就不行了,怎么写啊?
    、、、、、、、、、、
    应该查到的内容为空吧