开发者

ISNumeric is buggy in SQL Server?

开发者 https://www.devze.com 2023-03-23 19:11 出处:网络
When I do ISNUMERIC(\'0E1\') = 1, it returns true. Can anyone explain how SQL server qualifies \'E\' as numeric?

When I do ISNUMERIC('0E1') = 1, it returns true. Can anyone explain how SQL server qualifies 'E' as numeric?

Is this the right way to check 开发者_如何学运维numbers in SQL? Sorry I am new to T-SQL.


0E1 is numeric. http://en.wikipedia.org/wiki/Exponential_notation#E_notation

To allow only integers containing only numbers, see Best equivalent for IsInteger in SQL Server

0

精彩评论

暂无评论...
验证码 换一张
取 消