select * from a where a>100 and a<500 and ff is not null不等于可以<>??也可以!>??

解决方案 »

  1.   

    select * from a where num>100 and num<200 and ff is not null
    <>是不等于
      

  2.   

    select * from a where a>100 and a<500 and ff is not null<>
    比较两个表达式(比较运算符)。当比较非空表达式时,如果左边操作数的数值不等于右边的操作数,则结果为 TRUE;否则结果为 FALSE。如果两个操作数中有一个或者两个都为 NULL,并且 SET ANSI_NULLS 被设置为 ON,则结果为 NULL。如果 SET ANSI_NULLS 被设置为 OFF,则当一个操作数为 NULL 时结果为 FALSE,当两个操作数都为 NULL 时结果为 TRUE。两个表达式都必须有可隐式转换的数据类型
      

  3.   

    select * from a where between 100 and 500 and ff is not null