The JOIN clause connects two or more tables logically and retrieves data from the resulting connection. You join tables based on join conditions that can include DDM-configured fields.

Example

The following example illustrates the INNER JOIN for a DDM-configured field.
SELECT pub.Customer.CustNum, Name, OrderNum 
FROM pub.Customer, pub.Order
WHERE pub.Customer.CustNum = pub.Order.CustNum;
In this example, pub.Customer.CustNum is a DDM-configured field. The SQL engine processes the JOIN condition using the unmasked values of pub.Customer.CustNum, regardless of your DDM privileges. However, the SELECT list of the query returns the masked value of pub.Customer.CustNum for unauthorized users and the unmasked value for authorized users.