Data Mining

Download Free Data Mining Source Code In C/C++, C#, Visual Basic, Visual Basic.NET, Java,
and other programming languages
Welcome to Data Mining Sign in | Join | Help
in Search

Data Mining Source Code Newsletter

Announcing The Data Mining Source Code Newsletter!

Subscribe By Email | Subscribe By RSS Feed

Drop All Tables In A SQL Server 2005 Database

Last post 11-12-2006, 4:38 by Kingsley Tagbo. 0 replies.
Sort Posts: Previous Next
  •  11-12-2006, 4:38 6898

    Drop All Tables In A SQL Server 2005 Database

    To drop all tables in a SQL Server 2005 database use :

    sp_MSforeachtable command1 [,replacechar] [, command2] [,command3] [,whereand] [,precommand] [,postcommand

    Example : exec sp_MSforeachtable "DROP TABLE ? PRINT '? dropped' "

    This is the same in both SQL Server 2000 and SQL Server 2005 You have to execute the code a number of times or until no more tables remain in your database



    Sign-up For Data Mining Source Code Newsletter

    Filed under:

Announcing The Data Mining Source Code Newsletter!

Subscribe By Email | Subscribe By RSS Feed