C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
MySQL SIGN() FunctionThe 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. Syntaxselect sign(number); Parameter:number: It is the number for getting a sign. Returns:This function returns the sign of the argument. Example 1Select sign(11); Output: Example 2Select sign(-11); Output: Example 3Select sign(0); Output:
Next TopicMySQL Math
|