Truncate All Tables in sql server database
USE  [DatabaseName] EXEC  sp_MSforeachtable 'TRUNCATE TABLE ?'     Be careful that this will delete ALL data from all  user tables.  In case you are not able to TRUNCATE due to foreign keys etc. you  can run the same as a delete:     USE  [DatabaseName]  EXEC  sp_MSforeachtable 'DELETE FROM ?'