IsNumeric() and IsNull() Function in MS Access

1. IsNumeric() Function :
IsNumeric() Function in MS Access is used to check whether an expression can be evaluated as a number. It returns TRUE (-1) means that the expression can be recognized as a number; otherwise, it returns False(0).

Syntax :

IsNumeric(expression)

Parameter – Required; An expression.
expression – It is any variant containing a numeric expression or a string expression.
Returns – It returns True(-1) if the entire expression is recognized as a number, otherwise it returns False(0).

  • Example-1 :
    SELECT IsNumeric("GeeksforGeeks");

    Output –

    0
  • Example-2 :
    SELECT IsNumeric(111);

    Output –



    -1

    Note : IsNumeric returns False if expression is a date expression.

  • Example-3 :
    SELECT IsNumeric(#11/09/2020#);

    Output –

    0



2. IsNull() Function :
IsNull() Function in MS Access is used to check whether the expression is a Null value. It returns TRUE (-1) means that the expression is a Null value, and FALSE (0) indicates that the expression is not a Null value.

Syntax :

IsNull (expression)

Parameter – Required; An expression.
expression – It is any variant containing a numeric expression or string expression.
Returns – It returns True(-1) if expression is Null, otherwise it returns False(0).

  • Example-1 :
    SELECT IsNull("GeeksforGeeks");

    Output –

    0
  • Example-2 :
    SELECT IsNull(11);

    Output –

    0
  • Example-3 :
    SELECT IsNull(null);

    Output –

    -1
My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


Article Tags :
Practice Tags :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.