I want to delete from multiple table in a single statement h
I want to delete from multiple table in a single statement how will I do it?
4 Answers
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 attend5days leftRegister
Khargesh RajputRank #616 · 3.9K reputationPosted Feb 21, 2015, 1:34 AM EST
Pankaj Kumar ChoudharyRank #80 · 24.4K reputationPosted Feb 21, 2015, 7:54 AM EST
You can also use a trigger for deletion or use stored procedure according your requirements
Vikrant MoreRank #1,157 · 1.6K reputationPosted Feb 23, 2015, 4:55 AM EST
example for select like ,
exec sp_MSforeachtable 'select count(1) from ?'.
Jignesh TrivediRank #16 · 50.3K reputationPosted Feb 23, 2015, 5:57 PM EST
Read my article
http://www.c-sharpcorner.com/UploadFile/ff2f08/delete-all-table-data-within-a-database-in-sql-server/
it might help you.