Bee Eee Blog

MS SQL Delete all the data from the tables.

by brian on Nov.21, 2008, under coding, mmsql, sql

Here’s a helpful, and perhaps dangerous, little tidbit of code for SQL Server 2005. It deletes all of the data from all of the tables. To be completely effective, the command may need to be run more than once because of foreign keys. Basically run it until there aren’t any errors. Then the db is clean and empty of all data.

exec sp_MSForeachTable "delete from ?"

the sp_MSForeachTable is a very useful system stored procedure.

:, ,
126 comments for this entry:
  1. CARLOS

    ████████►BUY CIALIS◀████████…

    ▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲…

  2. WALTER

    Abilify@official.site” rel=”nofollow”>…

    Buyno prescription…

  3. DARRELL

    actonel@adverse.reactions” rel=”nofollow”>…

    Buygeneric meds…

  4. CLAUDE

    Allegra@official.site” rel=”nofollow”>…

    Buygeneric pills…

  5. SERGIO

    allopurinol@and.coumadin” rel=”nofollow”>…

    Buygeneric drugs…

  6. JEROME

    ashwagandha@supplement.now” rel=”nofollow”>…

    Buygeneric meds…

  7. SIDNEY

    atarax@and.hives” rel=”nofollow”>.

    Buygeneric drugs…

  8. CECIL

    Chantix@official.site” rel=”nofollow”>.

    Buydrugs without prescription…

  9. DENNIS

    Vitamin@B.now” rel=”nofollow”>.

    Buygeneric drugs…

  10. LEE

    cephalexin@use.now” rel=”nofollow”>…

    Buygeneric drugs…

  11. KIRK

    Depakote@official.site” rel=”nofollow”>…

    Buyit now…

  12. JULIAN

    depakote@400mg.now” rel=”nofollow”>.

    Buywithout prescription…

  13. GABRIEL

    Benuryl

    Buywithout prescription…

  14. GLENN

    Zyrtec

    Buygeneric pills…

  15. DAN

    zovirax acyclovir

    Buydrugs without prescription…

  16. JAMIE

    Zyrtec

    Buygeneric drugs…

  17. RANDY

    Vitamin B

    Buygeneric drugs…

  18. FERNANDO

    Rogaine

    Buyno prescription…

  19. WARREN

    Rogaine

    Buydrugs without prescription…

  20. ANDRE

    Seroquel

    Buywithout prescription…

  21. ANDY

    Pulmicort

    Buywithout prescription…

  22. VIRGIL

    Synthroid

    Buywithout prescription…

  23. TYRONE

    Zyprexa

    Buyno prescription…

  24. MARION

    Purim

    Buyno prescription…

  25. WARREN

    Risperdal

    Buydrugs without prescription…

  26. ALFREDO

    Reglan…

    Buywithout prescription…

  27. ADRIAN

    Pyridium@Pyridium.Pyridium” rel=”nofollow”>…

    Buygeneric meds…

  28. JIMMIE

    Prozac@Prozac.Prozac” rel=”nofollow”>…

    Buynow…

  29. EARL

    Pulmicort@Pulmicort.Pulmicort” rel=”nofollow”>..

    Buyit now…

  30. JIMMY

    Prozac@Prozac.Prozac” rel=”nofollow”>…

    Buygeneric drugs…

  31. JOSE

    Purim@Purim.Purim” rel=”nofollow”>..

    Buygeneric pills…

  32. WILLIE

    Strattera@Strattera.Strattera” rel=”nofollow”>…

    Buynow it…

  33. BENJAMIN

    Prozac@Prozac.Prozac” rel=”nofollow”>.

    Buywithout prescription…

  34. LUKE

    Cialis@Cialis.Cialis” rel=”nofollow”>..

    Buyno prescription…

  35. CORY

    Rogaine@Rogaine.Rogaine” rel=”nofollow”>..

    Buynow it…

  36. BENJAMIN

    prozac@is.great” rel=”nofollow”>…

    Buygeneric drugs…

  37. BRENT

    Buygeneric pills…

  38. GREG

    insulin@glargine.la” rel=”nofollow”>.

    Buygeneric pills…

  39. HOWARD

    can@you.take.aleve.and.darvocet.together” rel=”nofollow”>..

    Buygeneric drugs…

  40. DARREN

    how@to.get.quinine” rel=”nofollow”>.

    Buywithout prescription…

  41. DARRYL

    losee@weight.on.coumadin” rel=”nofollow”>..

    Buygeneric meds…

  42. CODY

    prevacid@childrens.chewable” rel=”nofollow”>.

    Buygeneric drugs…

  43. RAMON

    lidocaine@generic.name” rel=”nofollow”>…

    Buygeneric pills…

  44. JOSE

    abilify@urges.results” rel=”nofollow”>..

    Buygeneric drugs…

  45. KARL

    Buygeneric drugs…

  46. CLIFTON

    fml@internet.lingo” rel=”nofollow”>..

    Buyit now…

  47. ANDY

    folic@acid.hpv” rel=”nofollow”>..

    Buyno prescription…

  48. SCOTT

    oral@gentamicin.supllements.and.horses” rel=”nofollow”>…

    Buygeneric drugs…

  49. BRETT

    somnolence@and.geodon” rel=”nofollow”>..

    Buywithout prescription…

  50. JIMMY

    wholesale@ginseng.root” rel=”nofollow”>…

    Buyno prescription…

  51. Alexander7

    buy@generic.LEVITRA” rel=”nofollow”>…

    Need cheap generic LEVITRA?…

  52. SALVADOR

    Cheap@Abilify.Online” rel=”nofollow”>..

    Buygeneric meds…

  53. WALLACE

    Purchase@Cheap.Acai” rel=”nofollow”>…

    Buygeneric drugs…

  54. LEWIS

    Purchase@Acai.Without.Prescription” rel=”nofollow”>..…

    Buynow it…

  55. ENRIQUE

    Buy@Acai.500mg” rel=”nofollow”>.…

    Buynow it…

  56. ROLAND

    Generic@Acai.500mg.Without.Prescription” rel=”nofollow”>..…

    Buyno prescription…

  57. JIMMIE

    Buy@Discount.Coral.Calcium” rel=”nofollow”>..

    Buygeneric meds…

  58. EDUARDO

    Purchase@Discount.Abana” rel=”nofollow”>..

    Buygeneric pills…

  59. PERRY

    Buy@Generic.Abilify” rel=”nofollow”>…

    Buywithout prescription…

  60. DUSTIN

    Order@Abilify.Without.Prescription” rel=”nofollow”>..

    Buygeneric drugs…

  61. BRADLEY

    Order@Cheap.Coral.Calcium” rel=”nofollow”>.

    Buygeneric drugs…

  62. BRADLEY

    Purchase@Generic.Acai” rel=”nofollow”>..

    Buygeneric drugs…

  63. LOUIS

    Order@Cheap.Accupril” rel=”nofollow”>.…

    Buygeneric drugs…

  64. ALBERT

    Cheap@Aciphex.20mg” rel=”nofollow”>.…

    Buygeneric meds…

  65. WILLIAM

    Buy@Cheap.Acomplia” rel=”nofollow”>.…

    Buygeneric pills…

  66. RAY

    Actonel@35mg.Without.Prescription” rel=”nofollow”>.

    Buygeneric drugs zfk…

  67. SAMUEL

    Order@Discount.Adalat” rel=”nofollow”>.

    Buygeneric meds unm…

  68. VICTOR

    Order@Discount.Abilify” rel=”nofollow”>..

    Buygeneric pills zdg…

  69. DARYL

    Cheap@Abilify.Online” rel=”nofollow”>..

    Buygeneric drugs krg…

  70. MARCUS

    Get@Abilify.Online” rel=”nofollow”>..

    Buynow it vhx…

  71. LAWRENCE

    Order@Abilify.Without.Prescription” rel=”nofollow”>..

    Buywithout prescription dyo…

  72. ALLEN

    Purchase@Acai.Without.Prescription” rel=”nofollow”>.

    Buyit now ojb…

  73. JOHNNY

    Buy@Cheap.Energy.Boost” rel=”nofollow”>…

    Buygeneric meds svb…

  74. MARION

    Cheap@Generic.Accutane” rel=”nofollow”>..

    Buyno prescription gdt…

  75. WENDELL

    Cheap@Generic.Aciphex” rel=”nofollow”>..

    Buyno prescription lka…

  76. RONALD

    Generic@Aciphex.20mg.Without.Prescription” rel=”nofollow”>.

    Buygeneric drugs itj…

  77. LEWIS

    Order@Acomplia.Online” rel=”nofollow”>.

    Buygeneric drugs axm…

  78. BRUCE

    Purchase@Acomplia.Online” rel=”nofollow”>..

    Buyno prescription jui…

  79. WENDELL

    buy@acai.berry.juice” rel=”nofollow”>..

    Buygeneric drugs…

  80. BRYAN

    accutane@krupnick.class.action” rel=”nofollow”>..

    Buynow…

  81. ERIC

    abilify@company.buy” rel=”nofollow”>.

    Buywithout prescription…

  82. BRENT

    blue@sky.energy.solar.boost.3048” rel=”nofollow”>…

    Buynow it…

  83. RONNIE

    amoxicillin@online.buy” rel=”nofollow”>.

    Buygeneric drugs…

  84. PEDRO

    what is plavix

    Buy_drugs without prescription…

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...