How much space does a view take up in Microsoft SQL Server
I have a very large table in SQL Server 2008. It has lots of fields which are only useful to a certain segment of users, some of the fields some users shouldn't be able to see.
The table is huge so I wanted to create some simple views for each user class where I could give them access to the view and they could only see the columns they need.
Does a view take up space in the database, or would it be saved as a simple select statement?
Unless the view is indexed, it takes up almost no space, except for the definition of the view. The view itself is not like a table in that it physically stores rows in the database (unless it is an indexed view). It is only materialized (retrieves data) when it is called