user3480400 user3480400 - 2 months ago 4
SQL Question

How to alter table for a particular user? [SQL Oracle]

In SQL Developer, under one connection, we can have many users. Right now, I am trying to alter a table for a particular user but I have been failing to do so.

Here is my code:

ADD new_view_column VARCHAR(250),

If there is already similar question asked, can you help give me the link? Sincerely, I have been searching high and low but haven't got anywhere.

Otherwise, please advice me on this matter. Thank you.


SQL Developer will let you see any objects you have select privileges on; that does not mean you can modify the objects, and maybe not mean you can modify the data they contain.

To alter another user's table you need to have been granted the alter any table privilege, either directly to your user or via a role.

The "any" privileges are powerful though and should only be granted if really needed - which is true of any privilege of course, but particularly of those that might let a user cause problems outside their own schema.

Unless it is really necessary for your user, in a DBA-type role, to make changes elsewhere then the owner of the object should make any changes to it themselves. If you have the credentials for that schema you can just create a new connection with those, and will then be able to make changes directly as that user.