select top 4 * from table order by abs(scale-8) where scale is not null

解决方案 »

  1.   

    sql中是用
    where col1 is null
    来判断不能是
    where col1=null
      

  2.   

    select top 4 * from table order by abs(scale-8) where scale is not nullselect top 4 * from table where scale is not null order by abs(scale-8)以上两个句子那个正确?
      

  3.   

    或者select top 4 * from table order by abs(scale-8) where ISNULL(scale ,'') <> ''
      

  4.   

    刚才写错了是:
    select top 4 * from table where scale is not null order by abs(scale-8)
      

  5.   

    select top 4 * from table where scale is not null order by abs(scale-8)
    这句正确