1. 程式人生 > >mysql一次性刪除所有表而不刪除資料庫

mysql一次性刪除所有表而不刪除資料庫

1、執行如下語句獲取刪除語句

SELECT  CONCAT( 'drop table ', table_name, ';' ) from information_schema.tables
              where table_schema='資料庫名' and table_type='base table'

2、拷貝語句,然後複製到nvicat進行執行