select ' drop table ' || tname || ';' from tab;

清空就把drop 改为truncate