View is a a logical database object, which contains the logical representation of data. In a simple word View is the logical or virtual table.
Once you perform DML operation of view table the same operation automatically reflected to corresponding base table and vice-versa.
Note: Once you drop the base table the corresponding view will not be drop, but it will become invalid.
When view become Invalid ?
View will become invalid in three cases,
- Drop the base table.
- When the change the table name.
- When we modify the structure of the base table.
CREATE VIEW view_name as SELECT * FROM table_name;
Drop a View
DROP VIEW view_name