In this post explains how to use the ISNUMERIC function in SQL Server (Transact-SQL) with syntax and examples.
In SQL Server (Transact-SQL), the ISNUMERIC function returns 1 if the expression is a valid number. Otherwise, it returns 0.
The syntax for the ISNUMERIC function in SQL Server (Transact-SQL) is:
ISNUMERIC( expression )
The value to test whether it is a numeric value.
The ISNUMERIC function can be used in the following versions of SQL Server (Transact-SQL):
Let's look at some SQL Server ISNUMERIC function examples and explore how to use the ISNUMERIC function in SQL Server (Transact-SQL).
For example:
SELECT ISNUMERIC(1234);
Output: 1
SELECT ISNUMERIC('1234');
Output: 1
SELECT ISNUMERIC(10 * 5);
Output: 1
SELECT ISNUMERIC('AODBA.com');
Output: 0
SELECT ISNUMERIC('2014-05-01');
Output: 0