471,893 Members | 2,056 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,893 software developers and data experts.

SQL Server Views' Metadata

Be careful when implementing views (from SQL Server 97/2K). SQL Server
stores the metadata on the view at creation (or the last time it was
saved). This means if you have:
SELECT * FROM table1
it will put all the fields of table1 in the view's metadata. If you
then change table1 and add (for example) another field, this field
will not be visible in the view until you open it in design view and
click save (to update it).
Jul 20 '05 #1
1 2795
Rather than recreating the view, you can execute sp_refreshview to
update the metadata.

--
Hope this helps.

Dan Guzman
SQL Server MVP

-----------------------
SQL FAQ links (courtesy Neil Pike):

http://www.ntfaq.com/Articles/Index....partmentID=800
http://www.sqlserverfaq.com
http://www.mssqlserver.com/faq
-----------------------

"Carl" <ca****@yahoo.co.uk> wrote in message
news:bb**************************@posting.google.c om...
Be careful when implementing views (from SQL Server 97/2K). SQL Server
stores the metadata on the view at creation (or the last time it was
saved). This means if you have:
SELECT * FROM table1
it will put all the fields of table1 in the view's metadata. If you
then change table1 and add (for example) another field, this field
will not be visible in the view until you open it in design view and
click save (to update it).

Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Tom Jones | last post: by
3 posts views Thread by Subhas | last post: by
1 post views Thread by TGEAR | last post: by
reply views Thread by Desmodromic | last post: by
reply views Thread by zermasroor | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.