Skip to content

Instantly share code, notes, and snippets.

View trang1's full-sized avatar

Anthony Bru trang1

  • Saint-Petersburg
View GitHub Profile
@trang1
trang1 / drop-public-synonyms.sql
Created November 7, 2018 10:56
Oracle PL/SQL - How to delete all public synonyms for a schema
BEGIN
FOR cur_syn IN (SELECT synonym_name
FROM all_synonyms
WHERE table_owner = 'somebody')
LOOP
BEGIN
EXECUTE IMMEDIATE 'drop public synonym ' || cur_syn.synonym_name ;
EXCEPTION
WHEN OTHERS
THEN