Collections:
MOD() - Remainder of X divided by Y
How to calculate the remainder of X divided by Y using the MOD() function?
✍: FYIcenter.com
MOD(X, Y) is a MySQL built-in function that calculates the remainder of X divided by Y. For example:
SELECT MOD(253, 7), MOD(34.5, 3), MOD(2.6, 1.2); -- +-------------+--------------+---------------+ -- | MOD(253, 7) | MOD(34.5, 3) | MOD(2.6, 1.2) | -- +-------------+--------------+---------------+ -- | 1 | 1.5 | 0.2 | -- +-------------+--------------+---------------+
Reference information of the MOD() function:
MOD(X, Y): val Returns the remainder of X divided by Y. Arguments, return value and availability: X: Required. The dividend. Y: Required. The divisor. val: Return value. The remainder of the division. Available since MySQL 4.0.
⇐ MAKE_SET() - Filtering List with Binary Set
2023-11-15, 243🔥, 0💬
Popular Posts:
How To Divide Query Output into Multiple Groups with the GROUP BY Clause in SQL Server? Sometimes, y...
How To Change the Name of a Database User in SQL Server? If you want to change the name of an existi...
What Is an Oracle Instance in Oracle? Every running Oracle database is associated with an Oracle ins...
How to set database to be READ_ONLY in SQL Server? Databases in SQL Server have two update options: ...
Is SQL Server Transact-SQL case sensitive? No. Transact-SQL is not case sensitive. Like the standard...