A view is a virtual table that gets its data by executing an underlying SQL statement. Like a table, a view includes rows and fields. The data in a view may come from one or more tables.

Example

The following example illustrates the view created from a table that has DDM-configured fields.
CREATE VIEW new_customers AS SELECT Name, Address, City, State
FROM pub.Customer WHERE State IN ( 'NH', 'MA', 'ME', 'RI', 'CT', 'VT' );

SELECT * FROM new_customers;
In this example, the first statement creates a view that has DDM-configured fields Name and State. Irrespective of your DDM privileges, you can create a view that references DDM-configured fields, provided you have permission to create a view. If you do not have unmasking privileges, executing the SELECT query on the view returns the masked values of Name and State; otherwise, it returns the unmasked values.