Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
in SQL by (20.3k points)

What is the main difference between view and table in SQL? Is there any advantage of using views instead of tables.

1 Answer

0 votes
by (40.7k points)

The benefit of using the view is, it can join data from several tables. Hence, it creates a new view of it.

Example:  You have a database with departments and you need to perform complex statistical queries on it. Instead of performing the complex query on the database, you can save the query as the view and then SELECT * FROM view

Head over to this video, if you want to learn VIEW in SQL.

 If you want to know more differences between them, then the differences between View and Table in SQL are as follows:



The view is treated as a virtual table that is extracted from a database.

The table is structured with a set number of columns and a boundless number of columns

The table is database’s which are utilized to hold the information that is utilized in applications and reports. 

A view is additionally a database object which is utilized as a table and inquiry that can be connected to different tables.

The view is utilized to query certain information which is contained in a few distinct tables

The table holds fundamental client information and holds cases of a characterized object.

 In the view, you will get frequently queried information.

In the table, changing the information in the database likewise changes the information appeared in the view which isn't the

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Browse Categories