Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I learn that the indexed view holds the data from base tables while standard view does not holds data.Is it means that the indexed view need memory and standard view don't?

Indexed view needs to be bind with schema object.I am also confused about the point that '*' is not allow in the schema-bind object.For instance:

create view viewname as select * from tablename

The statement above can not work. why?

share|improve this question

closed as not a real question by jcolebrand Mar 20 '12 at 14:51

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

This can be solved by looking at any number of web resources. This does not need the input of a database administrator. Additionally, the question is vague and confusing – jcolebrand Mar 20 '12 at 14:52
  • An indexed view is physically stored ("materialised") on disk = requires memory
  • A standard view is simply an expandable macro: there is no persistence of the data and the base tables are always used

Other notes:

  • Both will return the correct data from the base tables
  • SQL Server will consider whether to use the indexed view or just expand it like a macro (subject to edition and NOEXPAND hint)

SELECT * is bad practice anyway, but * means you can't qualify all columns as required for indexed views

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.