eek
eek

Reputation: 724

Do views refresh if you reference them in a subquery?

I created a view in SQL Server 2008. It is the result set from joining two tables.

I am now running a query on another table that will have the following filter:

WHERE column_a NOT IN 
     (
     SELECT column_b
     FROM my_view
     )

Will this automatically regenerate the view so that column_b is up to date?

Upvotes: 0

Views: 87

Answers (1)

DanRedux
DanRedux

Reputation: 9359

Yes, views are living things, with feelings too! :)

Upvotes: 4

Related Questions