人大进仓更改数据库属主【执行即可】

\set SQLTERM /
DECLARE
table_name CHARACTER VARYING;
tsql CHARACTER VARYING;
BEGIN
FOR table_name IN SELECT TABLENAME FROM sys_tables WHERE SCHEMAname =‘public’ loop
tsql:= ‘alter table “public”.’|| table_name ||’ owner to ecology_0826’;
RAISE NOTICE ‘:%’,tsql;
EXECUTE tsql;
END loop;
END;
/
ecology_0826是更改后的数据库属主

你可能感兴趣的:(人大金仓,Linux,数据库,sql,金仓,oracle)