Learn Microsoft Sql Server
Learning is never ending process
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)
Graphical Query Plan
When SQL Server executes a query it uses a query plan to determine how to access data and complete the query. SQL Server offers DBAs and d...
First Database In Sql Server
First Database In Sql Server
No comments:
Post a Comment