ISNUMERIC
checks whether the specified value is a numeric type.
This function returns 1 if the value is numeric, and 0 if not.
This example checks whether values are numeric.
SELECT ISNUMERIC(10) AS '10',
ISNUMERIC('10') AS '"10"',
ISNUMERIC('Vincent') AS '"Vincent"'
10 | "10" | "Vincent" |
---|---|---|
1 | 1 | 0 |
The returned values represent boolean values. 1 = True, 0 = False.
ISNUMERIC
also returns 1 for strings with number and currency characters.
For example, SELECT ISNUMERIC('$10')
returns 1.
Syntax of the ISNUMERIC function.
ISNUMERIC(value)
value
-- a value or column to check.