STATEMENT_DIGEST(statement)

Given an SQL statement as a string, returns the statement digest hash
value as a string in the connection character set, or NULL if the
argument is NULL. The related STATEMENT_DIGEST_TEXT() function returns
the normalized statement digest. For information about statement
digesting, see
https://dev.mysql.com/doc/refman/8.0/en/performance-schema-statement-di
gests.html.

Both functions use the MySQL parser to parse the statement. If parsing
fails, an error occurs. The error message includes the parse error only
if the statement is provided as a literal string.

The max_digest_length system variable determines the maximum number of
bytes available to these functions for computing normalized statement
digests.

URL: https://dev.mysql.com/doc/refman/8.0/en/encryption-functions.html

