How to delete wildcard of tables on mySQL?

Discussion in 'MySQL' started by amaze, Sep 14, 2006.

  1. #1
    Hi,

    I have quite a few tables starting with "zzz_vb3" in my db and I would like to drop them all. Is there a wildcard I can use rather than doing it manually? Something like...

    "zzz_vb3%"

    Any ideas what the syntax would be?
     
    amaze, Sep 14, 2006 IP
  2. alemcherry

    alemcherry Guest

    Best Answers:
    0
    #2
    Not sure if drop table takes wildcard. It should not, most probably. I dont undersnad why you need to do such risky job. It doesnt take any time to run a show tables query, select all the ones you need, copy paste a drop table to each line as prefix.. and run the batch! Matter of max. 2 mts even if you have a few thousand tables!
     
    alemcherry, Sep 14, 2006 IP