sp_refreshview (T-SQL)

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.

Syntax

sp_refreshview [@viewname =] 'viewname'

Arguments
[@viewname =] 'viewname'
Is the name of the view. viewname, which can be a multipart identifier, is nvarchar, with no default.
Return Code Values

0 (success) or a nonzero number (failure)

Result Sets

None

Permissions

Only members of the db_owner fixed database role can execute sp_refreshview.

Examples

This example refreshes the metadata for the view titleview.

exec sp_refreshview titleview

  

See Also
System Stored Procedures  

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.