11.2.2 Retrieving, updating, adding, and deleting data in viewed tables
To make a retrieval from a viewed table, execute the SELECT data manipulation SQL statement. This is the same procedure used for a retrieval from a base table.
The following shows an example of a retrieval from a viewed table.
- Example
-
The following SQL statement retrieves the rows in which SEX is F (female) from the CUSTOMER30s table defined in 11.2.1 Defining a viewed table.
SELECT * FROM "CUSTOMER30s" WHERE "SEX" = 'F'
If you have access privileges required for an updatable viewed table, you can update, add, and delete data in the viewed table. To update, add, or delete data in a viewed table, execute the data manipulation SQL statement UPDATE, INSERT, or DELETE, respectively. This is the same procedure as used for updating, adding, or deleting a base table.