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.
| Function Name | Binary Input Supported | Collation Supported | Notes |
|---|---|---|---|
| General Manipulation | |||
| ASCII | |||
| BIT_LENGTH | ✔ | ||
| CHR , CHAR | |||
| CONCAT , || | ✔ | ✔ | |
| CONCAT_WS | ✔ | ✔ | |
| INSERT | ✔ | ||
| LENGTH, LEN | ✔ | ||
| LPAD | ✔ | ||
| LTRIM | |||
| OCTET_LENGTH | ✔ | ||
| PARSE_IP | |||
| PARSE_URL | |||
| REPEAT | |||
| REVERSE | ✔ | ||
| RPAD | ✔ | ||
| RTRIM | |||
| RTRIMMED_LENGTH | |||
| SOUNDEX | |||
| SOUNDEX_P123 | |||
| SPACE | |||
| SPLIT | ✔ | Provides partial support for collation. For details, see the documentation of the function. | |
| SPLIT_PART | |||
| SPLIT_TO_TABLE | |||
| STRTOK | |||
| STRTOK_TO_ARRAY | |||
| STRTOK_SPLIT_TO_TABLE | |||
| TRANSLATE | |||
| TRIM | |||
| UNICODE | |||
| UUID_STRING | |||
| Full-Text Search | |||
| SEARCH | |||
| SEARCH_IP | |||
| Case Conversion | |||
| INITCAP | |||
| LOWER | |||
| UPPER | |||
| Regular Expression Matching | |||
| [ NOT ] REGEXP | Alias for RLIKE. | ||
| REGEXP_COUNT | |||
| REGEXP_EXTRACT_ALL | Alias for REGEXP_SUBSTR_ALL. | ||
| REGEXP_INSTR | |||
| REGEXP_LIKE | Alias for RLIKE. | ||
| REGEXP_REPLACE | |||
| REGEXP_SUBSTR | |||
| REGEXP_SUBSTR_ALL | |||
| [ NOT ] RLIKE | |||
| Other Matching/Comparison | |||
| CHARINDEX | ✔ | ✔ | Alias for POSITION. Provides partial support for collation. For details, see the documentation of the POSITION function. |
| CONTAINS | ✔ | ✔ | Provides partial support for collation. For details, see the documentation of the function. |
| EDITDISTANCE | |||
| ENDSWITH | ✔ | ✔ | Provides partial support for collation. For details, see the documentation of the function. |
| [ NOT ] ILIKE | Case-insensitive alternative for LIKE. | ||
| ILIKE ANY | Case-insensitive alternative for LIKE ANY. | ||
| JAROWINKLER_SIMILARITY | |||
| LEFT | ✔ | ✔ | |
| [ NOT ] LIKE | |||
| LIKE ALL | |||
| LIKE ANY | |||
| POSITION | ✔ | ✔ | Provides partial support for collation. For details, see the documentation of the function. |
| REPLACE | |||
| RIGHT | ✔ | ✔ | |
| STARTSWITH | ✔ | ✔ | Provides partial support for collation. For details, see the documentation of the function. |
| SUBSTR , SUBSTRING | ✔ | ✔ | |
| Compression/Decompression | |||
| COMPRESS | ✔ | ||
| DECOMPRESS_BINARY | ✔ | ||
| DECOMPRESS_STRING | ✔ | ||
| Encoding/Decoding | |||
| BASE64_DECODE_BINARY | |||
| BASE64_DECODE_STRING | |||
| BASE64_ENCODE | ✔ | ||
| HEX_DECODE_BINARY | |||
| HEX_DECODE_STRING | |||
| HEX_ENCODE | ✔ | ||
| 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. | ||
| Cryptographic/Checksum | |||
| MD5 , MD5_HEX | Intended primarily for checksum operations. Not recommended for cryptography. | ||
| MD5_BINARY | Intended primarily for checksum operations. Not recommended for cryptography. | ||
| MD5_NUMBER_LOWER64 | Intended primarily for checksum operations. Not recommended for cryptography. | ||
| MD5_NUMBER_UPPER64 | Intended primarily for checksum operations. Not recommended for cryptography. | ||
| SHA1 , SHA1_HEX | |||
| SHA1_BINARY | |||
| SHA2 , SHA2_HEX | |||
| SHA2_BINARY | |||
| Hash (Non-cryptographic) | |||
| HASH | ✔ | Allows data types other than string and binary. Not intended for cryptography. | |
| HASH_AGG | ✔ | Allows data types other than string and binary. Not intended for cryptography. | |
| Collation | |||
| COLLATE | |||
| COLLATION | |||
| AI Functions | |||
| AGENT_RUN (SNOWFLAKE.CORTEX) | |||
| AI_AGG | |||
| AI_CLASSIFY | |||
| AI_COMPLETE | |||
| AI_COUNT_TOKENS | |||
| AI_EMBED | |||
| AI_FILTER | |||
| AI_REDACT | |||
| AI_SENTIMENT | |||
| AI_SIMILARITY | |||
| AI_SUMMARIZE_AGG | |||
| AI_TRANSLATE | |||
| CLASSIFY_TEXT (SNOWFLAKE.CORTEX) | |||
| COMPLETE (SNOWFLAKE.CORTEX) | |||
| DATA_AGENT_RUN (SNOWFLAKE.CORTEX) | |||
| EMBED_TEXT_768 (SNOWFLAKE.CORTEX) | |||
| EMBED_TEXT_1024 (SNOWFLAKE.CORTEX) | |||
| ENTITY_SENTIMENT (SNOWFLAKE.CORTEX) | |||
| EXTRACT_ANSWER (SNOWFLAKE.CORTEX) | |||
| FINETUNE (SNOWFLAKE.CORTEX) | |||
| PARSE_DOCUMENT (SNOWFLAKE.CORTEX) | |||
| SPLIT_TEXT_MARKDOWN_HEADER (SNOWFLAKE.CORTEX) | |||
| SPLIT_TEXT_RECURSIVE_CHARACTER (SNOWFLAKE.CORTEX) | |||
| SENTIMENT (SNOWFLAKE.CORTEX) | |||
| SUMMARIZE (SNOWFLAKE.CORTEX) | |||
| TRANSLATE (SNOWFLAKE.CORTEX) | |||
| COUNT_TOKENS (SNOWFLAKE.CORTEX) | |||
| TRY_COMPLETE (SNOWFLAKE.CORTEX) | |||
| SEARCH_PREVIEW (SNOWFLAKE.CORTEX) |