SQL ISNUMERIC Function

ISNUMERIC checks whether the specified value is a numeric type.

This function returns 1 if the value is numeric, and 0 if not.

Example

#

This example checks whether values are numeric.

SELECT ISNUMERIC(10) AS '10',
       ISNUMERIC('10') AS '"10"',
       ISNUMERIC('Vincent') AS '"Vincent"'
Result:  1 record
10 "10" "Vincent"
1 1 0

The returned values represent boolean values. 1 = True, 0 = False.


Using ISNUMERIC

#

ISNUMERIC also returns 1 for strings with number and currency characters.

For example, SELECT ISNUMERIC('$10') returns 1.


Syntax

Syntax of the ISNUMERIC function.

ISNUMERIC(value)

value -- a value or column to check.


You may also like



Guides


vsn 3.1