1

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.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
SiCd
  • 17
  • 3

1 Answers1

4

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

Community
  • 1
  • 1
JJJ
  • 32,902
  • 20
  • 89
  • 102
  • Ok but that ways, wrong data could go in the DB. How can I write this query so that sql server returns false – SiCd Jul 30 '11 at 08:24