Selection views

The selection views apply a WHERE clause to the table, with an automatic filter on the records.

WHERE filter

The selection views show a subset of the table-view records, adding a WHERE clause to the statement, to heve the view show only the records that pass the where clause.

For example, we could have a table CONTACTS, that includes every commercial contact, client or not, with a boolean column IS_CLIENT that identifies the clients from the simple contacts.

If we want to show only the clients, we have to include the clause WHERE IS_CLIENT=true in every select statement.

Creating a selection view with the built in WHERE clause can avoid a lot of work, since the selection is applied automatically every time.

Calculated column

A selection view can have a calculated column, that usually is the one used for selection. In the example above, inserting a record in the CLIENTS view will automatically set the IS_CLIENT column as true.