Announcement

Collapse
No announcement yet.

MySQL command to completely empty an entire database?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • MySQL command to completely empty an entire database?

    Hey guys,

    Can anyone give the MySQL command to COMPLETELY empty a database of all data?

    Thanks!
    "CREEPSHOW CREEPS ONLINE" - The first & best online resource dead-icated to Stephen King & George A. Romero's 1982 horror anthology classic!!!!

  • #2
    Code:
    DROP DATABASE `moo`;
    Scott MacVicar

    My Blog | Twitter

    Comment


    • #3
      Followed by
      Code:
      CREATE DATABASE `moo`;
      of course...

      Comment


      • #4
        You'll loose both data and structure with that though.
        Best Regards
        Colin Frei

        Please don't contact me per PM.

        Comment


        • #5
          I assumed that was the object... but it's a good point.

          As a second thought, if you are going to use the DROP / CREATE method, ensure that you have permission for both those commands before you run either of them!

          Comment

          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
          Working...
          X