Documentation
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

sql_contains

sql_contains returns whether or not the SQL query contains a particular string.

Syntax

  SQL_CONTAINS(<substring>)

Arguments

<substring>
The string to search for within the SQL query text.

Returns

TRUE
If the SQL query contains the given substring.
FALSE
If the SQL query doesn’t contain the substring.

Usage Notes

  • SQL_CONTAINS performs case-sensitive matching.

Examples

SQL_CONTAINS('-- My Special Comment')

SQL_CONTAINS('ORDER BY mycol DESC')