Question: We have already created the database framework, with all the relations and dependencies. But inside the tables were just the dummy data, and we need to get rid of these dummy data, and start adding the correct ones. How can we clear everything and leave the primary keys (IsIdentity: yes) back to zero, and also without affecting the foreign-table relational structure.

Thanks a lot!

Answer: 
I'd use TRUNCATE:

```
-- Truncate table (very fast, and it resets Identity as well)
EXEC sp_MSForEachTable "TRUNCATE TABLE ?"

```

Of course, disable and re-enable check constraints too, as suggested by kristof.
Generate Database schema-only sql file using **[Database publishing wizard](http://www.microsoft.com/downloads/details.aspx?FamilyId=56E5B1C5-BF17-42E0-A410-371A838E570A&displaylang=en)** and enable the option to drop the tables if exists. Run this script on your database and This will flush everything and give you fresh schema as you need.