Collections:
RANDOM_BYTES() - Generating Random Bytes
How to generates random bytes using the RANDOM_BYTES() function?
✍: FYIcenter.com
RANDOM_BYTES(len) is a MySQL built-in function that
generates random bytes of a given length.
For example:
SELECT HEX(RANDOM_BYTES(16)), HEX(RANDOM_BYTES(16)); -- +----------------------------------+----------------------------------+ -- | HEX(RANDOM_BYTES(16)) | HEX(RANDOM_BYTES(16)) | -- +----------------------------------+----------------------------------+ -- | A81DAEC87FC92E7C630ED06A8AA04842 | 5ECF237CF5C416561665EBD68968B109 | -- +----------------------------------+----------------------------------+
Reference information of the RANDOM_BYTES() function:
RANDOM_BYTES(len): bin generates random bytes of a given length. Arguments, return value and availability: len: Required. The number of bytes to be generated. bin: Return value. The generated byte string. Available since MySQL 4.1.
⇐ MD5() - Calculating MD5 Hash
2023-12-14, 1015🔥, 0💬
Popular Posts:
How To Generate Random Numbers with the RAND() Function in SQL Server Transact-SQL? Random numbers a...
How To Install PHP on Windows in MySQL? The best way to download and install PHP on Windows systems ...
How To List All Login Names on the Server in SQL Server? If you want to see a list of all login name...
How To Break Query Output into Pages in MySQL? If you have a query that returns hundreds of rows, an...
How To Start MySQL Server in MySQL? If you want to start the MySQL server, you can run the "mysqld" ...