你的对的啊。select * from table1 where a+b<I

解决方案 »

  1.   

    --示例代码:
    declare @tb1 table(a int,b int,i int)
    insert into @tb1 
    select 1,2,4 union all
    select 2,3,4 union all
    select 3,4,8 union all
    select 3,4,7select * from @tb1 where a+b<i/*
    a           b           i           
    ----------- ----------- ----------- 
    1           2           4
    3           4           8(所影响的行数为 2 行)
    */
      

  2.   

    支持 funsuzhou(羡米奇)(努力ing,成为专家中!)
      

  3.   

    create table tb1(a int,b int)
    insert into tb1 
    select 1,2, union all
    select 2,3, union all
    select 3,4, union all
    select 3,4,declare @i int
    set @i=20
    select * from ar where a+b<@I
    运行结果
    a        b
    1 2
    5 4
    6 2