September 1, 2011

Check valid number in SQL Server

We can easily check an input is valid number or not in SQL Server.
ISNUMERIC function returns 1 or 0 if expression is valid number
it returns 1 otherwise 0.

Example:
image
Here expression is valid number so output is coming 1.
Now we are passing number with blank space it means it is not a valid number so output
output should be 0.

image

That’s It
Enjoy Learning.

No comments:

Post a Comment