sql server - To add a column to a view -
i working on view in sql server 2012 long (has around 800 columns). allow users add custom columns table(a separate ui allows user specify column name, type , max length).once column added table, must reflected in view too. there way automatically accomplish ? right now, need create alter view statement existing 800+ columns , newly added column. also, can sp_refreshview used purpose? looking answers. in advance.
if manually set columns included view (i mean select column1, column2 from
), automatic update isn't possible. if select *
used in view (bad practice), there solution:
exec sp_refreshview [dbo.v_customer]
and more common form here (update views).
Comments
Post a Comment