You can use session changing commands within a SQL block for Microsoft SQL Server and Sybase databases.
In previous versions, Dynamic Data Masking handled database session changing commands through special rules. In these rules the session changing command was identified using a regular expression match. Then Dynamic Data Masking created the appropriate symbol to handle the command. However, when a session changing command was inside a SQL block, the command was ignored.
Dynamic Data Masking can now extract the session changing info from the command. Dynamic Data Masking then rewrites the command appropriately to extract the correct column metadata from the table.