Unit V
Unit V
UNIT-V
VIEWS
• View is a virtual table which is based on select statement.
• It is a logical table which does not occupy space because it does not
have data of its own. It always retrieves record from base tables.
• View is used for following purposes.
• Granting permission on some selected column of a table without
disclosing the table to user.
• Getting record from multiple table without writing the join condition
every time.
• Accessing group function information like sum,min,max column wise
without writing group function every time.
SOME MORE FACTS ON VIEWS
• We can join more than one views.
• If you drop base table on which the view is based does not get
dropped.
• Any operation you do on view it get redirected to base table to
view.
• Details about views are stored in the data-dictionary on views
i.e.. User_ views.
• Syntax
• Create or replace view<name of view>as<select statement>
EXAMPLE ON VIEWS