ISNUMERIC IN SQL SERVER 2005

1.It determines whether an expression is a valid numeric type.

2.It will help us in validating the input data.

3.ISNUMERIC returns 1 when the input expression evaluates to a valid numeric data type; otherwise it returns 0

4.A return value of 1 indicates that expression can be converted to at least one of the numeric types.

5.If the expression is of type int ,numeric, bigint, money, smallint,
smallmoney, tinyint, float, decimal, real the function will return 1
else 0.

Examples are given below
_________________________________

a.SELECT ISNUMERIC (1) –This will return 1

b.SELECT ISNUMERIC (NULL) — This will return 0.

c.SELECT ISNUMERIC (getdate())– This will return 0.

b.SELECT ISNUMERIC(‘PAWAN’)– This will return 0.

e.SELECT ISNUMERIC(657346538)–This will return 1

f.select ISNUMERIC(3.20) — –This will return 1

Pawan Kumar
Pawankkmr@gmail.com

Advertisements