zoukankan      html  css  js  c++  java
  • 高级数据过滤(like)

    单字符过滤 '_'

    select * from T_Employee where FName like  '_erry'

    多字符过滤 '%'

    select * from T_Employee where FName like  'T%'

    集合匹配过滤 [jt] :第一个字母为J 或t的信息

                      [^jt] 反集合: 第一个字母不为J 或T 的信息

    select * from T_Employee where FName like'[jt]%'

    select * from T_Employee where FName  like '[^jt]%'

    SQL中查询空值, 不能直接使用普通的等于来判断, 要使用关键字'is null / is not null ',因为数据库中一些特殊的设定会查询不到

    select * from T_Employee where FAge is null
    select * from T_Employee where FAge is not null and FSalary>2000

    反运算符 ' != 不等于 !< 不小于  ' 等  三种表达方式 '!'符只能在SqlServer DB2 数据库中 使用

    select * from  T_Employee where FAge!=23 and FSalary!<5000
    select * from T_Employee where FAge<>23 and FSalary>=5000
    select * from T_Employee where not(FAge=23) and not(FSalary<5000)  not 反运算

  • 相关阅读:
    TPLINK TLWR710N设置详解
    hehe.....
    AS3写FTP登录过程
    QQ
    网页设计标准尺寸:
    女孩,你愿意做他的第几个女朋友
    監聽一個變量的值變化
    dispatchEvent
    10
    C#常用代码
  • 原文地址:https://www.cnblogs.com/lucky9/p/6251903.html
Copyright © 2011-2022 走看看