我设计了一张数据库表(t_Pro) 其中一个 字段 PriceOrder 的类型定义为 :Money
我想查找 价格为 100 元左右的商品,这样的SQL语句如何写?
 我一开始这样写:
 select * from t_Pro
 where PriceOrder like '10%'
 居然出错。

解决方案 »

  1.   

    另外 我想控制 价格的范围:
    我用了一个edit1控件 。
    代码如下:
     adoqry_mx.add('select * from t_Pro where like ''' + Edit1.text + '%''');
    这样是不能控制的。
    比如我要查找 :1、 100-109员的;
                  2、 100-200元的;
    这两种分别怎样写?
      

  2.   

    一个不行,就用两个。
    用between...and或者>= and <=呗。
      

  3.   

    可是用select  语句 如何写?
      

  4.   

    select * from table where field between StrToInt(Edit1.Text) and StrToInt(Edit2.Text);select * from table where field >= StrToInt(Edit1.Text) and field<= StrToInt(Edit2.Text);