Difference between query of privileges in tables
Reading this answe r I found a query to find the privileges of a table: SELECT * FROM ALL_TAB_PRIVS WHERE TABLE_NAME = 'MY_TABLE' But a friend give me to me this query: select a.USERNAME,a.GRANTED_ROLE,b.ROLE,b.owner,b.TABLE_NAME,b.privilege from user_role_privs a,role_tab_privs b where b.ROLE=a.GRANTED_ROLE and b.TABLE_NAME = 'MY_TABLE'; There is some substantial difference between each query? They are quite different, yes. In Oracle, privileges on a table can be granted either directly to a user (in which case they would appear in ALL_TAB_PRIVS ) or privileges can be granted to a role