Is there an sql condition that can look for non integers in a column?

前端 未结 2 985
南方客
南方客 2021-02-07 06:00

Basically I would like a select statement that would function like this

SELECT *
FROM table  
WHERE column IS NOT INT  

Is there a condition li

2条回答
  •  终归单人心
    2021-02-07 06:07

    You could also use

    SELECT  *
    FROM    T 
    WHERE  C = ''
            OR C LIKE '%[^0-9-]%' /*Contains a char other than - or 0-9*/
            OR C LIKE '_%-%'  /*Contains the - char other than 1st position*/
    

提交回复
热议问题