Getting Started with ASP.NET MVC - Part 6: ASP.NET MVC and Entity Framework
First Time? You can support us by signing up. It takes only 5 seconds. Click here to sign up. If you already have an account, click here to login.


Upload Image Close it
Select File

Learned something today? Share it, or learn from what others have learned today

You can drop multiple tables using single DROP statement

Jun 10 2011 4:43AM by Madhivanan   

Suppose you have three tables named test1,test2 and test3 and you want to drop all these three, you can do it in a single DROP statement

DROP table test1,test2,test3
Read More..  [5005 clicks]


Madhivanan
4 · 39% · 8850
52
 
4
 
51
 
0
Incorrect
 
0
Interesting
 
0
Forgotten
 
0
Move



Submit

16  Comments  

  • I never knew this! Thanks for sharing this.

    commented on Jun 10 2011 10:33AM  .  Report Abuse This post is not formatted correctly
    Jacob Sebastian
    1 · 100% · 22504
  • I have seen quirky updates before, but not quirky deletes. This is great, and very useful!

    Thank-you for this wonderful find!

    commented on Jun 10 2011 11:34AM  .  Report Abuse This post is not formatted correctly
    Nakul Vachhrajani
    6 · 26% · 5941
  • Self experiment is a great source of knowledge! thanks

    commented on Jun 11 2011 12:13PM  .  Report Abuse This post is not formatted correctly
    Rui Carvalho
    33 · 6% · 1272
  • Everyone, Thanks for the feedback

    commented on Jun 13 2011 2:15AM  .  Report Abuse This post is not formatted correctly
    Madhivanan
    4 · 39% · 8850
  • Tried with procedures & databases and works well :)

    DROP PROCEDURE Procedure1, Procedure2, Procedure3 GO

    DROP DATABASE DB1, DB2, DB3 GO

    I think, it works pretty much with anything that you can drop using DROP statement.

    commented on Jun 20 2011 12:42PM  .  Report Abuse This post is not formatted correctly
    Dattatrey Sindol (Datta)
    43 · 5% · 1080
  • Thanks Madhi and Datta.

    But we cant use truncate like this.

    TRUNCATE table1, table2, table3.

    commented on Jun 22 2011 4:54AM  .  Report Abuse This post is not formatted correctly
    Pothiraj
    36 · 5% · 1229
  • Pothiraj, yes truncate can not be used that way

    commented on Jun 22 2011 4:57AM  .  Report Abuse This post is not formatted correctly
    Madhivanan
    4 · 39% · 8850
  • Good to know. Thanks for sharing

    commented on Jun 30 2011 5:53AM  .  Report Abuse This post is not formatted correctly
    Hardik Doshi
    23 · 7% · 1647
  • very simple but powerful tip

    commented on Jul 6 2011 4:20AM  .  Report Abuse This post is not formatted correctly
    Deepak kelath
    267 · 0% · 112
  • Thank you for good TIP thanks for sharing.

    commented on Jul 13 2011 12:53AM  .  Report Abuse This post is not formatted correctly
    Abhijeet Desai
    400 · 0% · 62
Previous 1 | 2 Next

Your Comment


Sign Up or Login to post a comment.

"You can drop multiple tables using single DROP statement" rated 5 out of 5 by 52 readers
You can drop multiple tables using single DROP statement , 5.0 out of 5 based on 52 ratings
    Copyright © Beyondrelational.com Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising