Skip to main content

random_bytes

random_bytes​

description​

The random_bytes function generates a sequence of random bytes.

Syntax​

VARCHAR random_bytes(INT len)

Parameters​

  • len: The random_bytes function takes a single argument, which specifies the length of the generated random byte sequence.

example​

mysql> select random_bytes(7);
+------------------------------------------------+
| random_bytes(7) |
+------------------------------------------------+
| 0x53edd97401fb6d |
+------------------------------------------------+

keywords​

RANDOM BYTES