Learn MsSql Server
Monday, 18 March 2013
How to delete all view of database .
I am explaining this with concept of Dynamic sql .
DECLARE @sql VARCHAR(MAX)='';
SELECT @sql=@sql+'DROP VIEW '+name +';' FROM sys.views;
EXEC(@sql);
It will delete all view of your database.
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment