mysql -----------查询表数量,删除多表

SELECT COUNT(*) TABLES, table_schema FROM information_schema.TABLES
WHERE table_schema = 'b_pmi' GROUP BY table_schema;

SELECT CONCAT("DROP TABLE ", TABLE_NAME, ";")
FROM information_schema.TABLES
WHERE TABLE_SCHEMA = "b_pmi" AND TABLE_NAME LIKE "t_oa_%";

posted @ 2013-05-22 08:47  jshen  阅读(184)  评论(0编辑  收藏  举报