Check if an expression is a valid numeric type. Return 1 for valid numeric type and 0 for invalid numeric type.
ISNUMERIC Syntax:
ISNUMERIC(expression)
ISNUMERIC Example:
SELECT ISNUMERIC('abc') as col_1,
ISNUMERIC('01/28/2014') as col_2,
ISNUMERIC(123) as col_3,
ISNUMERIC(null) as col_4,
ISNUMERIC(-1) as col_5,
ISNUMERIC(0.8) as col_6;
col_1 | col_2 | col_3 | col_4 | col_5 | col_6 |
---|---|---|---|---|---|
0 | 0 | 1 | 0 | 1 | 1 |
See also: T-SQL Functions -> COALESCE | HOST_ID | HOST_NAME | ISNULL | NULLIF