Search code examples
oracledatabase-permissions

Retrieve all tables selectable by a user (in Oracle)


How can I retrieve a list of all tables to which a user is has SELECT permission (either granted directly or through an assigned role)?


Solution

  • select table_name from TABLE_PRIVILEGES where grantee='USER' and select_priv='Y'
    union
    select table_name from  user_tables