Hi!!
Not sure whether this is a good practice to do so..but it works fine for me..(make sure the user have file privilege & the server has Information_schema database..)
Things to change here..
test- Name of the database
C:\MySQL5.1.7\bin>mysql -uroot test
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 50 to server version: 5.1.7-beta-community
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> SELECT concat('DROP TABLE',' ',table_name,';')
-> INTO OUTFILE "c:/umesh.sql"
-> FROM information_schema.TABLES
-> WHERE TABLE_SCHEMA='test';
Query OK, 2 rows affected (0.02 sec)
mysql> source c:/umesh.sql;
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.01 sec)
mysql>
Regards,
Umesh Shastry
http://www.blogger.com/profile/02551756983528645221