Export (0) Print
Expand All

ISNUMERIC (Transact-SQL)

 

Applies To: SQL Server 2014, SQL Server 2016 Preview

Determines whether an expression is a valid numeric type.

Applies to: SQL Server (SQL Server 2008 through current version), Azure SQL Database, Azure SQL Data Warehouse Public Preview.

Topic link icon Transact-SQL Syntax Conventions


ISNUMERIC ( expression )

expression

Is the expression to be evaluated.

ISNUMERIC returns 1 when the input expression evaluates to a valid numeric data type; otherwise it returns 0. Valid numeric data types include the following:

int

numeric

bigint

money

smallint

smallmoney

tinyint

float

decimal

real

System_CAPS_noteNote

ISNUMERIC returns 1 for some characters that are not numbers, such as plus (+), minus (-), and valid currency symbols such as the dollar sign ($). For a complete list of currency symbols, see money and smallmoney (Transact-SQL).

The following example uses ISNUMERIC to return all the postal codes that are not numeric values.

USE AdventureWorks2012;
GO
SELECT City, PostalCode
FROM Person.Address 
WHERE ISNUMERIC(PostalCode)<> 1;
GO
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2015 Microsoft