469,275 Members | 1,475 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,275 developers. It's quick & easy.

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 2693
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
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.