MySQL Forums
Forum List  »  Newbie

Re: DROP TABLE with jolly char
Posted by: Roland Bouman
Date: July 31, 2005 12:34PM

What version of mysql are you using? If >= 5.02, you could use the information schema:

SELECT concat('DROP TABLE ',table_name,';')
FROM information_schema.tables
WHERE table_schema = '<name of your database>'

or

WHERE table_schema = SCHEMA()`

for the current database.

This generates the code you need to drop the tables.

Options: ReplyQuote


Subject
Written By
Posted
Re: DROP TABLE with jolly char
July 31, 2005 12:34PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.