+ 1
What is the use of view in sql.
Already having table but when we should go for virtual table (view)
3 Answers
+ 1
for example if you want to view the data of two tables or more . you combine their data in a view instead of creating a new table .
0
Another use is to restrict the records or the columns you want to show. For instance, you could have a detail table with the invoices of some vendors, and you could create a view that summarizes the total amount for each vendor.
0
Views can also be much easier to maintain when managing how data flows from one location to the next, especially in data warehousing. If there is a column change in a source table it's much easier to simply change the query that the view is maintained by instead of changing a desination table and the data transform process. Makes change management in a company much easier.