- This operation requires the SYSTEM-level BLACKLIST privilege. You can follow the instructions in GRANT to grant this privilege.
- The blacklist is only for SELECT statements, INSERT statements (from v3.1 onwards), and CTAS statements (from v3.4 onwards).
Syntax
Parameter
sql_reg_expr: the regular expression that is used to specify a certain SQL pattern. To distinguish the special characters in the SQL statement and those in the regular expression, you need to use the escape character \ as a prefix for the special characters in the SQL statement, such as (, ), and +. Whereas ( and ) have been often used in SQL statements, the database can identify ( and ) in SQL statements directly. You do not need to use the escape character for ( and ).
Examples
Example 1: Addcount(\*) to the SQL blacklist.
count(distinct ) to the SQL blacklist.
order by limit x, y, 1 <= x <=7, 5 <=y <=7 to the SQL blacklist.
* and - in SQL statements.
_statistics_.column_statistics: