Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
SQL Server 2005 データベースからすべての行を削除したいと考えています。
データベースからすべての行を簡単に削除する手順を定義できる人はいますか?
その場合、これは機能します:
EXEC sp_MSForEachTable 'ALTER TABLE ? NOCHECK CONSTRAINT ALL' GO EXEC sp_MSForEachTable 'DELETE FROM ?' GO EXEC sp_MSForEachTable 'ALTER TABLE ? CHECK CONSTRAINT ALL' GO
すべてをありがとう。
たぶんこれが役立ちます:
http://vadivel.blogspot.se/2006/07/easiest-fastest-way-to-delete-all.html