declare @sql varchar(max) declare @tablenames varchar(max) select @tablenames = coalesce(@tablenames + ', ','') + Table_Name from INFORMATION_SCHEMA.TABLES where Table_Name like ('lg-010-%') set @sql = 'drop table ' + @tablenames exec (@sql)
No comments:
Post a Comment