Views in SQL
1. Creating view
A view can be created using the CREATE VIEW statement. We can create a view from a single table or multiple tables.
2. Creating View from a single table
In this example, we create a View named DetailsView from the table Student_Detail.
Just like table query, we can query the view to view the data.
3. Creating View from multiple tables
View from multiple tables can be created by simply include multiple tables in the SELECT statement.
In the given example, a view is created named MarksView from two tables Student_Detail and Student_Marks.
To display data of View MarksView:
4. Deleting View
A view can be deleted using the Drop View statement.
If we want to delete the View MarksView, we can do this as: