資料庫數字欄位檢視是否是小數
1、SQLServer資料庫
select
*
from
@tb where
d<>round(d,0)
2、oracle資料庫
SELECT C_NUM,
CASE
WHEN C_NUM - TRUNC(C_NUM) = 0 THEN
'整數'
ELSE
'非整數'
END
FROM (SELECT 3.000 C_NUM
FROM DUAL
UNION ALL
SELECT 3.100
FROM DUAL
UNION ALL
SELECT 4.400
FROM DUAL
UNION ALL
SELECT 5.400
FROM DUAL
UNION ALL
SELECT 5.000 FROM DUAL)