Last post Nov 04, 2019 06:34 AM by Yang Shen
Nov 04, 2019 05:38 AM|Manishamani|LINK
What is the difference between view ans temp table in sql server?
Nov 04, 2019 06:34 AM|Yang Shen|LINK
As far as i know, temporary tables and views can be totally different things in SQL Server.
A temporary table is just like a normal table in you database, but temporary table only exist in session, once you close the session, the temporary table will also disappear.
A view is usually the result of a query, it can be stored in your database, you can see it in your SSMS in the Views folder. They are usually created to store a result of a complex query from your datasource (and its data can be affected by the datasource)
so that you can do more queries on the result based on the simple view.
For more information, you can refer to Views and SQL - Temporary Tables.
Hope the explanation is clear.