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.).
  • Regular expression matching.
  • Encoding and decoding strings using Base64 or Hexadecimal.
  • Using hash functions (MD5) or cryptographic functions (SHA1 or SHA2) to encode/encrypt strings.
Function Name Binary Input Supported Notes
General    
   
 
Alias for POSITION.
   
 
 
   
 
  Case-insensitive alternative for LIKE.
   
 
 
 
  Case-sensitive alternative for ILIKE.
   
 
   
 
   
   
 
   
   
 
 
 
   
   
   
   
   
 
 
   
   
   
   
   
Regular Expression    
  Alias for RLIKE.
   
   
  Alias for RLIKE.
   
   
   
Encode/Decode    
   
   
 
   
   
 
  Error-handling version of BASE64_DECODE_BINARY.
  Error-handling version of BASE64_DECODE_STRING.
  Error-handling version of HEX_DECODE_BINARY.
  Error-handling version of HEX_DECODE_STRING.
Hash/Cryptographic    
   
   
   
   
   
   
   

Note

Snowflake provides additional hash functions (HASH and HASH_AGG); however, they are not intended to be used as cryptographic functions. In addition, they are not listed here because they take any data type as inputs, rather than only string or binary data.