A table contains data, a view is just a SELECT statement which has been saved in the database (more or less, depending on your database).
The advantage of a view is that it can join data from several tables thus creating a new view of it. Say you have a database with salaries and you need to do some complex statistical queries on it.
Instead of sending the complex query to the database all the time, you can save the query as a view and then SELECT * FROM view..
In case the other explanations are too technical for you:
- Tables are the actual database entities that hold your rows.
- Views are "imaginary" tables that are constructed based on the actual tables.
Tables as you know store the actual data. Views will require and use actual columns from the actual tables. The rows are filtered in your SQL statement when creating the view. Views allows for easier viewing of tables and/or access to data in the tables when multiple tables are joined are joined. They are typically used to viewing specific data sets for easy access or decision making. For example, I have a view that is constructed based on my Customer and Order table. This view only has the columns that I need to fill out invoices. Having this view will save on typing SQL statements to join the two tables (and the rest of the logic) and output specific columns and rows while I can just use a select all statement to get all I need (all of course must be defined in view when creating it; other select statements can further filter a view). There are limitations and restrictions to updating and deleting from views. That I will leave you to read up on.
Source : Stack overflow[^] & yahoo[^]