If you have been granted DDM privileges on the DDM-configured fields of a table, you can insert values into those fields using the INSERT statement. If you are not authorized to unmask the fields in which you are inserting the data, the insert operation fails.

You can use scalar subqueries (SSQ) to provide data for DDM-configured fields in an INSERT statement only when you have permission to unmask those fields.

Example

The following example illustrates the INSERT statement for a DDM-configured field.
INSERT INTO PUB.Customer (CustNum, Name, State, Phone) 
SELECT SupplierIDNum, Name, State, Phone from PUB.Supplier;
If Supplier.Phone is a DDM-configured field, the query inserts:
  • Masked values for Supplier.Phone into Customer.Phone if you are not authorized to unmask Supplier.Phone.
  • Unmasked values of Supplier.Phone into Customer.Phone if you are authorized to unmask Supplier.Phone.
However, if Customer.Phone is a DDM-configured field, the query:
  • Fails with an error, regardless of your privileges for Supplier.Phone, if you are not authorized to unmask Customer.Phone.
  • Inserts the unmasked values of Supplier.Phone into the Customer.Phone if you are authorized to unmask both Customer.Phone and Supplier.Phone.