Oracle grants other users permission to access all tables

1. Statement

Give user B the authority of a certain table of user A.

GRANT SELECT ON A.tablename to B;

Two, batch operation 

1. Assign the query authority of user A to user B, and execute the query results below to assign the query authority of all tables under user A to user B.

select 'GRANT SELECT ON A.'||table_name||' to B;'  from user_tables;

2. Assign user A's query, modify, insert, and delete permissions to user B, and execute the query results below to assign query, modify, insert, and delete permissions of all tables under user A to user B.

select 'GRANT SELECT , INSERT, UPDATE, DELETE ON A.'||table_name||' to B;'  from user_tables;

 

Guess you like

Origin blog.csdn.net/weixin_42228950/article/details/103694562