Multiple choice technology databases

What is the function which is used to check whether the value is a numeric value or not?

  1. Select isnumeric('Test Text')

  2. Select numeric('Test Text')

  3. Both of the above

  4. none of the above

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

ISNUMERIC() is the correct SQL Server function to test if a value can be converted to a numeric type. It returns 1 if the expression is numeric, 0 otherwise. Option A shows the correct syntax. There is no NUMERIC() function in SQL Server (option B is incorrect). ISNUMERIC works with various inputs including strings to test if they contain numeric data.