The WHERE clause filters the rows from the table. You can use various SQL constructs with the WHERE clause, like relational operators, IN, EXISTS, and so on, to form a query filter on the table fields. The SQL engine uses the unmasked values of the fields specified in the WHERE clause, irrespective of your DDM privilege to view unmasked data.

Examples

The following examples illustrate the use of WHERE clause with DDM-configured fields.
SELECT *
FROM pub.Customer
WHERE CreditLimit < 5000 AND Balance < 500;
SELECT *
FROM pub.Customer c1
WHERE c1.CreditLimit > (SELECT AVG(c2.CreditLimit) FROM pub.Customer c2);

In these examples, CreditLimit is a DDM-configured field. The SQL engine processes the WHERE condition using the unmasked values of CreditLimit, regardless of your DDM privileges. However, the SELECT list of the query returns the DDM-configured fields as unmasked for authorized users and masked for unauthorized users.