where ever we use a select statement we get some kind of resultset. in order to save our time sql provides a functionality to save such queries as views so Views are basically stored queries.
Views has many advantages:
- Save time as we don’t have to write the same queries again and again
- It helps to have a better security view as we can restrict the direct access to certain users and we can give access to the views which they require
- Views can hide the structure of the tables.
How to create a new view:
- Create view <Viewname>
- select * from <TableName>
how to access view:
- select * from <ViewName>