declare cur cursor read_only forselectdistinct table_name from information_schema.columns where table_name like'yixing_%' declare@namevarchar(40),@sqlvarchar(1000) open cur fetchnextfrom cur into@name while (@@fetch_status=0) begin set@sql='drop table '+@name exec (@sql) fetchnextfrom cur into@name end close cur deallocate cur go
declare cur cursor read_only for select distinct table_name from information_schema.columns where table_name like yixing_% declare @name varchar(40),@sql varchar(1000) open cur fetch next from