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 16th, 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?

#887 Score: 0
Lincoln Burrows
Moderator
16 pts

Yes you can delete it from the command prompt try this

EXEC xp_cmdshell 'SQLCMD -U <user> -P <password> -Q 'EXEC sp_MSforeachtable @command1 = "DROP TABLE ?" ' ,no_output