Difference between View and table in sql

后端 未结 7 1402
别那么骄傲
别那么骄傲 2020-12-02 05:45

Possible Duplicate:
Difference Between Views and Tables in Performance

What is the main difference between vi

相关标签:
7条回答
  • 2020-12-02 06:12

    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

    0 讨论(0)
提交回复
热议问题