What is a VIEW in MySQL?

Views are virtual tables which are stored SQL queries with certain given name. VIEW replaces a SELECT query with a given named view. A view contains rows and columns, just like a real table. The fields in a view are fields from one or more real tables in the database.



 

Create a view with an example:

 

Call the View similar to Table

 



How to Delete a View

 

Advantages of view in MySql

  1. The view is a little faster than the MySQL table
  2. The view is safer than mysql table
  3. Reduce data distraction
  4. It won’t take much space, as it is a virtual table.