Javatpoint Logo
Javatpoint Logo

MySQL SIGN() Function

The sign() is a Math function of MySQL. This function is used to get a sign of the given number. If the number is less than 0, this function returns -1. If the number is 0 or 1 or greater than 0, this function returns 0.

Syntax

Parameter:

number: It is the number for getting a sign.

Returns:

This function returns the sign of the argument.

Example 1

Output:

MySQL Math SIGN() Function

Example 2

Output:

MySQL Math SIGN() Function

Example 3

Output:

MySQL Math SIGN() Function
Next TopicMySQL Math




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA