What is the use of view in sql. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What is the use of view in sql.

Already having table but when we should go for virtual table (view)

25th May 2017, 9:14 AM
Sunil GL
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 .
25th May 2017, 11:08 AM
Bahhaⵣ
Bahhaⵣ - avatar
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.
25th May 2017, 4:33 PM
Álvaro
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.
26th May 2017, 5:50 AM
Christian Shaw
Christian Shaw - avatar