RANDOM_STRING function


RANDOM_STRING returns a string of random characters. The contents of the string are determined by the mode being used. There are 5 modes.

  • Alphanumeric mode (default): all uppercase and lowercase letters in the Latin alphabet and all digits are used (a-z, A-Z and 0-9)

  • Letters mode: all uppercase and lowercase letters in the Latin alphabet are used (a-z and A-Z)

  • Numbers mode: all digits are used (0-9)

  • Hex mode: all hexadecimal characters are used (0-9 and a-f)

  • Custom mode: a user-provided string is used as the character-set. In addition to letters and digits, this string can include punctuation (!, &, -, etc.), emojis (😊, 👍, 👀, etc.), and characters from non-Latin alphabets (И, 卵, 金, ز, etc.).