Collections:
SIGN() - Sign of a Number
How to get the sign of a given number using the SIGN() function?
✍: FYIcenter.com
SIGN(X) is a MySQL built-in function that rounds the sign of X as -1, 0, or 1. For example:
SELECT SIGN(-32), SIGN(0), SIGN(234); -- +-----------+---------+-----------+ -- | SIGN(-32) | SIGN(0) | SIGN(234) | -- +-----------+---------+-----------+ -- | -1 | 0 | 1 | -- +-----------+---------+-----------+
Reference information of the SIGN() function:
SIGN(X): int Returns the sign of the argument as -1, 0, or 1, depending on whether X is negative, zero, or positive. Arguments, return value and availability: X: Required. The input value. int: Return value. The integer representing the sign of X. Available since MySQL 4.0.
⇒ SIN() - Sine Trigonometric Value
⇐ ROUND() - Rounding to Decimal Place
2023-11-15, 246🔥, 0💬
Popular Posts:
How To Get the Definition of a Stored Procedure Back in SQL Server Transact-SQL? If you want get the...
How To Turn on mysql Extension on the PHP Engine in MySQL? The "mysql" API extension is provided as ...
How To End a Stored Procedure Properly in SQL Server Transact-SQL? Where the end of the "CREATE PROC...
What is SQL Server Transact-SQL (T-SQL)? SQL Server Transact-SQL, also called T-SQL, is an extension...
What Is an Oracle Instance in Oracle? Every running Oracle database is associated with an Oracle ins...