Sql
how to truncate multiple tables in a particular database
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Jignesh TrivediRank #16 · 50.3K reputationPosted Sep 4, 2012, 10:17 PM EDT
there is no direct method to trancate mutiple table in sql.
so you retrive all table and trancate it one by one.
please refer below link it might help you
http://devpinoy.org/blogs/keithrull/archive/2007/09/07/how-to-truncate-multiple-tables-in-sql-server-and-the-magic-of-sp-msforeachtable.aspx
but if you FK with table so you can not trancate table.
hope this will help you.