where substr(col,1,4) = '2024' or substr(col,1,2) <> '20'

解决方案 »

  1.   

    ORACLE有没有函数处理这种情况的
      

  2.   

    如果是char的或varchar的
    where col not like '20%' or col='2024'如果是number的
    where (
            ( col>=3000 and col <2000  )
           or col =2040
          )
      

  3.   

    ORACLE:
    where substr(列名,1,4) = '2024' or substr(列名,1,2) <> '20'SQL Server:
    where substring(列名,1,4) = '2024' or substring(列名,1,2) <> '20'