Pages

May 18, 2016

Table changes not automatically reflected in a SQL Server View

For example you have added new columns to the tables which are used by SQL view. Nothing is changed in the view but when you execute the view or any other object which is using the view you will see columns not found error message.

To fix that, we need to refresh the view using below T-SQL command.

exec sp_refreshview [dbo.ViewName]

No comments: