fallenangel99
Golden Member
hey all,
anyone have any idea how to drop ALL views in a SQL Server database for a given schema?
Here is what I got (from google)
select 'drop view [' + TABLE_SCHEMA + '].' + QUOTENAME
(TABLE_NAME)from INFORMATION_SCHEMA.VIEW
The above script lists all the views for that schema.. how do I drop them ALL at the same time rather than do 'drop view <view_name>' one by one?
Thanks.
anyone have any idea how to drop ALL views in a SQL Server database for a given schema?
Here is what I got (from google)
select 'drop view [' + TABLE_SCHEMA + '].' + QUOTENAME
(TABLE_NAME)from INFORMATION_SCHEMA.VIEW
The above script lists all the views for that schema.. how do I drop them ALL at the same time rather than do 'drop view <view_name>' one by one?
Thanks.