I want to drop multiple tables with ease without actually listing the table names in the drop query and the tables to be deleted have prefix say \'wp_\'
Simple solution without risk of error:
mysqldump
create a file that contains DROP
command like
DROP TABLE IF EXISTS `wp_matable`;
a 'grep
' with "DROP TABLE wp_
" give us the commands to execute
so drop is made by theses trhee lines (you can edit drop.sql to check which tables would be dropped before)
mysqldump -u user -p database > dump.sql
grep "DROP TABLE `wp_" dump.sql > drop.sql
mysql -u user -p database < drop.sql