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, 1124🔥, 0💬
Popular Posts:
How to download and install Microsoft .NET Framework Version 2.0 in SQL Server? .NET Framework Versi...
Where to find answers to frequently asked questions on Downloading and Installing SQL Server 2005 Ex...
How To Query Tables and Loop through the Returning Rows in MySQL? The best way to query tables and l...
How To End a Stored Procedure Properly in SQL Server Transact-SQL? Where the end of the "CREATE PROC...
Can You Drop an Index Associated with a Unique or Primary Key Constraint in Oracle? You can not dele...