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, 905🔥, 0💬
Popular Posts:
What Happens If the UPDATE Subquery Returns Multiple Rows in MySQL? If a subquery is used in a UPDAT...
How to run Queries with SQL Server Management Studio Express in SQL Server? 1. Launch and connect SQ...
How To List All Login Names on the Server in SQL Server? If you want to see a list of all login name...
Where to find answers to frequently asked questions on Storage Engines: MyISAM, InnoDB and BDB in My...
How To Count Rows with the COUNT(*) Function in SQL Server? If you want to count the number of rows,...