postgre 批量删除表
作者:互联网
注意:使用时请注意,表名一定要写对,否则有可能误删!!!
do
$$
declare
select_results record;
table_name varchar;
begin
for select_results in
select tablename from pg_tables where schemaname='表空间' and tablename like '表名%'
loop
table_name=select_results.tablename;
execute 'drop table ' || table_name;
END LOOP;
end;
$$
标签:批量,删除,tablename,results,postgre,表名,table,select,name 来源: https://www.cnblogs.com/doumenwangjian/p/16527482.html