Skip to content

Instantly share code, notes, and snippets.

@shangoyanyi
Last active November 2, 2015 05:43
Show Gist options
  • Save shangoyanyi/433cddac08d7aee8dd10 to your computer and use it in GitHub Desktop.
Save shangoyanyi/433cddac08d7aee8dd10 to your computer and use it in GitHub Desktop.
Oracle - grant privilege to all tables
-- thanks to all in this article
-- https://community.oracle.com/thread/618903
--
FOR x IN (SELECT * FROM user_tables)
LOOP
EXECUTE IMMEDIATE 'GRANT SELECT ON ' || x.table_name || ' TO <<someone>>';
END LOOP;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment