MySQL Drop Table Command
Instead of running the drop table command one by one in MySQL Database, use the script below to generate the long list of drop table command.
mysql -u <username> -p <db name> -e "show tables" | grep -v Tables_in | grep -v "+" | \gawk '{print "drop table " $1 ";"}'
This command won’t drop any table in your MySQL database, but I advise you to run this in your TEST or DEV environment unless you know what is this command doing. In actual, this command will generate the drop table list of of the table resides in your MySQL database.
Related Posts
- Backup Script For Linux-Apache-PHP-MySQL
- Analyze, Repair And Optimize MySQL Database
- Gather Table Statistics In Oracle 10g
- FND_TABLES Table Name, FND_COLUMNS Column Name
- SRVCTL Oracle Database Command
PreviousNext» Invalid Database Object
Leave a Comment



