CREATE PROCEDURE `drop_tables_like`(IN pattern VARCHAR(255), IN db VARCHAR(255)) begin select @str_sql:=concat('drop table ', group_concat(table_name)) from information_schema.tables where table_schema=db and table_name like pattern; prepare stmt from @str_sql; execute stmt; drop prepare stmt; end;