先上sql:
select concat('DROP TABLE IF EXISTS ', table_name, ';') from information_schema.tables where table_schema = 'shcema_name'
schema_name 指的是具体得数据库,这样在获取结果集之后,就可以将结果集复制出来,进行执行了。
先上sql:
select concat('DROP TABLE IF EXISTS ', table_name, ';') from information_schema.tables where table_schema = 'shcema_name'
schema_name 指的是具体得数据库,这样在获取结果集之后,就可以将结果集复制出来,进行执行了。