Skip to content

Instantly share code, notes, and snippets.

View oberonlai's full-sized avatar

Oberon Lai oberonlai

View GitHub Profile
@jibbius
jibbius / drop_table_like.sql
Created May 16, 2013 15:43
MySQL - Drop Tables WHERE tablename like();
/*
* MySQL - Drop Tables WHERE tablename like();
*/
SET @tables = NULL;
SELECT GROUP_CONCAT(table_schema, '.', table_name) INTO @tables FROM information_schema.tables
WHERE table_schema = 'db_1' AND
(
table_name LIKE BINARY 'wp_bp_%'