“select * from table” vs “select colA, colB, etc. from table” interesting behaviour in SQL Server 2005

sp_refreshview to fix the view, or use WITH SCHEMABINDING in the view definition

If a view is not created with the
SCHEMABINDING clause, sp_refreshview
should be run when changes are made to
the objects underlying the view that
affect the definition of the view.
Otherwise, the view might produce
unexpected results when it is queried.

Leave a Comment