高分求一SQL语句,怎么取MONEY类型的范围。
比如我要查询价格是10.00到20.00之间的记录,SQL该怎么写?
 select * from table where price <= "20.00" and price>="10.00"为什么不行啊
在线等

解决方案 »

  1.   

    select * from table where price between 10 and 20
      

  2.   

    money不能这样比price <= "20.00"  ^0^
      

  3.   

    create table test(price money)
    insert test
    select 1.0 union all
    select 10.00 union 
    select 19.2 union 
    select 20select * from test where price between 10 and 20select * from test where price>=10.00 and price<=20.00
    drop table test
      

  4.   

    select * from test where price>=10.00 and price<=20.00
      

  5.   

    拾人牙~
    select * from table where price <= 20.00 and price>=10.00
      

  6.   

    select * from table where price between 10.00 and 2.00