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)
First Database In Sql Server
What is the difference between inner and outer join?
Inner Join Inner join is the most common type of Join which is used to combine the rows from two tables and create a result set contai...
First Database In Sql Server
No comments:
Post a Comment