create table test
(
a decimal(13,10),
b int ,
c decimal(13,2)
)
insert into test
select 0.01,1,0.01select * from test where a<0
以上的查询语句,返回空,求大虾分析下,谢谢!

解决方案 »

  1.   

    0.01 > 0OK  ???
      

  2.   

    <0当然没有数据
    你加一条a=-0.001的试下
      

  3.   

    if OBJECT_ID('test') is not null
    drop table test
    go
    create table test
    (
    a decimal(13,10),
    b int ,
    c decimal(13,2)
    )
    insert into test
    select 0.01,1,0.01
    union all
    select -0.01,1,0.01select * from test where a<0
    /*a                                       b           c
    --------------------------------------- ----------- ---------------------------------------
    -0.0100000000                           1           0.01(1 行受影响)
    */
      

  4.   

    0.01>0,那你查a<0当然为空了!!