• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 443
  • Last Modified:

delete all tables with a prefix

want to delete all the tables that start (prefix) '17_'

there are 20 tables

I do not want to copy paste all the names
1 Solution
Guy Hengel [angelIII / a3]Billing EngineerCommented:
you can generate the script easily:
select concat('DROP TABLE ', TABLE_NAME, ';')
  where TABLE_NAME LIKE '17__%' 

Open in new window

and copy/paste the output to mysql to execute that.
rgb192Author Commented:
At first I did not understand, and then I realized that it was a 2 part process and I pasted and ran.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now