Refreshes the metadata for the specified view. Persistent metadata for a view can become outdated because of changes to the underlying objects upon which the view depends.
sp_refreshview [@viewname =] 'viewname'
0 (success) or a nonzero number (failure)
None
Only members of the db_owner fixed database role can execute sp_refreshview.
This example refreshes the metadata for the view titleview.
exec sp_refreshview titleview
System Stored Procedures |