declare @sql varchar(8000) set @sql='' select @sql=@sql+ ', '+name from sysobjects where type= 'V ' and name not in( 'syssegments ', 'sysconstraints ') set @sql= 'drop view '+stuff(@sql, 1, 1, ' ') exec(@sql)
declare @sql varchar(8000) set @sql='' select @sql=@sql+ ', '+name from sysobjects where type= 'V ' and name not in( 'syssegments ', 'sysconstraints ') set @sql= 'drop view '+stuff(@sql, 1, 1, ' ') exec(@sql)