Home » Reply » Reply To: How to delete all tables in SQL Server database?

Reply To: How to delete all tables in SQL Server database?

Lincoln Burrows ~ Modified: November 7th, 2015 ~ ~ 1 Minute Reading

Home Forums How to delete all tables in SQL Server database? Reply To: How to delete all tables in SQL Server database?

#885 Score: 0
Lincoln Burrows
Moderator
16 pts

You should try this too

SELECT 'USE Serv DROP TABLE [' + SCHEMA_NAME(schema_id) + '].[' + name + ']' FROM sys.tables
SELECT ' USE Serv DROP PROCEDURE [' + SCHEMA_NAME(schema_id) + '].[' + name + ']' FROM sys.procedures