125
DB2 RazorSQL View
A view is used to define an alternative way of representing the data stored in a table. A view is not a real table and doesn?t have any permanent storage. It facilitates you to look at the data in one or more tables. It is a named specification of a result table.
A VIEW can derived from one or more tables. You can use upto 15 tables to create a VIEW.
A VIEW can contain all the columns or a certain columns from the table.
Create a View
Syntax:
Example:
Advantages of VIEW
- It makes data easier to use because it represents data from more than one tables as a single table.
- It can increase security because it restrict the access to the base tables and providing the access to the view can increase security to base table data.
- It can increase controlled access over the database.
- It can able to hide the complex queries and makes the end user life easy by representing the data in single table from more than one table.
- Views can have the derived columns, apart from the retrieved columns.
Next TopicCreate Index