T-sql - determine if value is integer

后端 未结 20 2167
情深已故
情深已故 2020-11-30 12:11

I want to determine if a value is integer (like TryParse in .NET). Unfortunatelly ISNUMERIC does not fit me because I want to parse only integers a

20条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-30 12:46

    I am not a Pro in SQL but what about checking if it is devideable by 1 ? For me it does the job.

    SELECT *
    FROM table    
    WHERE fieldname % 1 = 0
    

提交回复
热议问题