直接+0判断即可。
select * from table where col+0=col;
例如,表内容如下:
POINT_NM|POINT_ID
5 | 1
6 | 2
7tt | 3
取得最大的POINT_NM值,要求是整型,sqlite语句如下:
select MAX(cast(POINT_NM as int)) as POINT_NM
from POINT
where POINT_NM+0 = POINT_NM
结果如下:
POINT_NM
6