DROP Tables and Procedures Using MS SQL Server
DROP Tables and Procedures Using MS SQL Server -- query to get all Tables DECLARE @sql NVARCHAR(max)='' SELECT @sql += ' DROP PROCEDURE ' + QUOTENAME(TABLE_SCHEMA) + '.'+ QUOTENAME(TABLE_NAME) + '; ' FROM INFORMATION_SCHEMA.PROCEDURES WHERE TABLE_TYPE = 'BASE TABLE' SELECT @SQL -- after executing the below query, All tables will dropped. EXEC Sp_executesql @sql -- query to get all procedures SELECT 'DROP PROCEDURE [' + SCHEMA_NAME(p.schema_id) + '].[' + p.NAME + '];' FROM sys.procedures p