批量删除指定表

SELECT
    CONCAT(
        'drop table ',
        table_name,
        ';'
    )
FROM
    information_schema. TABLES
WHERE
    table_schema = 'dbname'
AND table_name LIKE 'sth_%';

 

posted @ 2018-06-05 12:32  北里闻箫  阅读(127)  评论(0编辑  收藏  举报