The READ object privilege introduced with the 12c (12.1.0.2) version. It allows us to read a table without locking. It is used to create read-only users in databases. The difference from SELECT privilege that it does not cause any locks on the table. The SELECT query locks the affected rows in the table when running with FOR UPDATE. READ object privilege allows us to read without causing this situation.
It would be more accurate to grant READ privilege to users instead of SELECT privilege.
The READ object privilege can be granted as follows.
1 | SQL> GRANT READ ON user1.table TO user2; |
A user who has granted the READ object privilege instead of SELECT will receive the following error when he/she use “for update” in his/her query.
1 2 3 4 | SQL> SELECT * FROM user1.table FOR UPDATE; * ERROR at line 2: ORA-01031: insufficient privileges |