SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    exit();
    Join Date
    Jul 2000
    Posts
    759
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is it possible to drop multiple tables at once in mySQL, instead of just doing it like this:

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">code/font><HR><pre>
    DROP TABLE tablename;
    [/code]

    Because I have a couple of tables that I want to delete, but would take a while to do it one by one.

    Thanks!

    ------------------
    ICQ Me! (73902680)

  2. #2
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    If you shut down your MySQL server and log in so that you have access to the MySQL data directory, you can simply delete the table files themselves.

    Each database is represented by a subdirectory of the main MySQL data directory. Each table is represented by three files: tblName.frm, tblName.MYD, and tblName.MYI. Deleting all three of these is equivalent to dropping the table.

    Do NOT delete or otherwise modify those files while the MySQL server is running!


    ------------------
    -Kevin Yank.
    http://www.SitePoint.com/
    Helping Small Business Grow Online!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •