A MySQL view is simply an ordinary database object that can save SQL query writers a lot of time when used correctly. A view is a stored query that a user can reference just like a table. Many times users will find themselves using the same base query over and over to solve multiple problems. Views are a way of quickly saving that query and referencing it later.

What are the Advantages of Using Views?

Views have several advantages. First, views appear to the MySQL user just like a table. The SELECT clause can reference a view precisely like it would a table. Another advantage is that when the underlying tables referenced by a view change, the view’s results also change. A third advantage is that a view takes up very little space on the server. The view’s SQL results are calculated every time it is accessed, so they are not stored on the server until they are accessed.

#database #databases #mysql #query #sql

How to Create and Use MySQL Views
1.70 GEEK