Skip to content

Collection of scripts to clear out data from any populated tables in a SQL Server DB

Notifications You must be signed in to change notification settings

philbo/DBCleaner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Using the two scripts you can clear out any data from an exisiting SQL Server database.

1. Run 'DropAndRecreateForeignKeys.sql' to generate statements to drop and recreate all foreign keys.
2. Run 'GetTablesWithData.sql' to generate statements to delete data from existing tables.
3. Run the drop foreign key statements.
4. Run the delete statements.
5. Run the recreate foreign key statements.

About

Collection of scripts to clear out data from any populated tables in a SQL Server DB

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published