Home > Software design >  Why without setting object privileges to oracle we can insert/select?
Why without setting object privileges to oracle we can insert/select?

Time:08-25

I can select, insert into table without specifying privilege, why?

  1. create user test_a
  2. grant system privileges create session
  3. grant object privilege create table
  4. login as test_a user
  5. I can create my_job table (as expected) but also I can do insert/select of my_job as unexpected, because I do not grant select/insert privilege (commented)

enter image description here

CodePudding user response:

That's because you are the owner of that table which means that you can do anything you want with it. You can perform any DML (select, insert, update, delete), but also any DDL on it - you can alter the table (add new columns, modify existing ones), truncate it or even drop it - all that without any additional privileges.

But, if you'd want to allow someone else do stuff on your tables, then you'd have to grant privileges to other users.

  • Related