Collections:
RAND() - Random Value Generator
How to generate a random value using the RAND() function?
✍: FYIcenter.com
RAND(s) is a MySQL built-in function that
returns the random value.
For example:
SELECT RAND(), RAND(), RAND(3.14); -- +--------------------+--------------------+--------------------+ -- | RAND() | RAND() | RAND(3.14) | -- +--------------------+--------------------+--------------------+ -- | 0.5206212648382609 | 0.5714487923043303 | 0.9057697559760601 | -- +--------------------+--------------------+--------------------+
Reference information of the RAND() function:
RAND(s): v Returns a random floating-point value v in the range 0 <= v < 1.0 Arguments, return value and availability: s: Optional. The seed value used in the random generation algorithm v: Return value. The random value Available since MySQL 4.0.
⇒ ROUND() - Rounding to Decimal Place
⇐ RADIANS() - Degrees to Radians
2023-11-14, 1253🔥, 0💬
Popular Posts:
What Happens to an Arithmetic Operation with Two Different Data Types in SQL Server Transact-SQL? Wh...
How To Convert Binary Strings into Integers in SQL Server Transact-SQL? Binary strings and integers ...
How To Find Out What Privileges a User Currently Has in Oracle? Privileges granted to users are list...
How To Convert Numeric Values to Character Strings in MySQL? You can convert numeric values to chara...
How to connect SQL Server Management Studio Express to SQL Server 2005 Express in SQL Server? Once y...