you are here: codestackercodes [RSS]Drop all tables in a MySQL Database

Drop all tables in a MySQL Database

run in shell:

echo DROP TABLE `echo 'SHOW TABLES;' | mysql -u USER -p DATABASE | tail -n +2 | sed -e 's/$/,/'` | sed -e 's/,$/;/'

Comments