String & Binary Functions

This family of functions perform operations on a string input value or binary input value (for certain functions) and return a string or numeric value.

The functions are grouped by type of operation performed:

  • General string operations (matching, padding, trimming, etc.).
  • Encoding and decoding strings using Base64 or Hexadecimal.
  • Encrypting/encoding strings using hash functions (MD5) or cryptographic functions (SHA1 or SHA2).
Sub-category Function Notes
General ASCII  
BIT_LENGTH Supports binary input.
CHARINDEX Alias for POSITION. Supports binary input.
CHR , CHAR  
CONCAT , || Supports binary input.
CONTAINS Supports binary input.
EDITDISTANCE  
ENDSWITH Supports binary input.
ILIKE Case-insensitive alternative for LIKE.
INITCAP  
INSERT Supports binary input.
LEFT Supports binary input.
LENGTH Supports binary input.
LIKE Case-sensitive alternative for ILIKE.
LOWER  
LPAD Supports binary input.
LTRIM  
OCTET_LENGTH Supports binary input.
PARSE_URL  
POSITION Supports binary input.
REPEAT  
REPLACE  
REVERSE Supports binary input.
RIGHT Supports binary input.
RPAD Supports binary input.
RTRIM  
RTRIMMED_LENGTH  
SPACE  
SPLIT  
SPLIT_PART  
STARTSWITH Supports binary input.
SUBSTR , SUBSTRING Supports binary input.
TRANSLATE  
TRIM  
UPPER  
UUID_STRING  
Encode/Decode BASE64_DECODE_BINARY  
BASE64_DECODE_STRING  
BASE64_ENCODE Supports binary input.
HEX_DECODE_BINARY  
HEX_DECODE_STRING  
HEX_ENCODE Supports binary input.
TRY_BASE64_DECODE_BINARY Error-handling version of BASE64_DECODE_BINARY.
TRY_BASE64_DECODE_STRING Error-handling version of BASE64_DECODE_STRING.
TRY_HEX_DECODE_BINARY Error-handling version of HEX_DECODE_BINARY.
TRY_HEX_DECODE_STRING Error-handling version of HEX_DECODE_STRING.
Hash/Cryptographic MD5 , MD5_HEX  
MD5_BINARY  
MD5_NUMBER  
SHA1 , SHA1_HEX  
SHA1_BINARY  
SHA2 , SHA2_HEX  
SHA2_BINARY