Object permission and system permission
Table creation and session creation are system permissions;
The system administrator has the permission to access other tables.
Log On As sys
Sqlplus sys/on_change_install as sysdba;
Create user wangwu
Create user wangwu identified by wangwu;
System Permissions
Grant create session to wangwu;
Grant create table to wangwu;
Grant unlimited tablespace to wangwu;
Grant create table to public; // grant the table creation permission to all users;
Revoke system Permissions
Revoke create session from wangwu;
Revoke create table from wangwu;
Revoke unlimited tablespace from wangwu;
View System Permissions
Select * from user_sys_privs;
Log On With wangwu
Sqlplus wangwu/wangwu;
Create a table mytab
Create table mytab (id int, name varchar (20 ));
Object permission
Grant all/select/insert/update/delete on mytab to lisi;
Revoke object permissions
Revoke all/select/insert/update/delete on mytab from lisi;
View object permissions
Select * from user_tab_privs;
Object permissions can be controlled to columns
Grant update (name) on mytab to lisi;
Grant insert (id) on mytab to lisi;
View column Permissions
Select * from user_col_privs;
Note:
Query and deletion cannot be controlled to columns.
Note:
1. Each table belongs to a specific user;
2. If you want to operate tables of other users, you must first grant the corresponding permissions;
3. When accessing tables of other users, you need to add the prefix username, such as wangwu. mytable
4. Insert tables of other users. commit is required for update. Otherwise, the table owner cannot modify the table structure;
Only the table owner can grant table operation permissions to others.
Public users refer to all users.
Oracl permission can be used to control columns,
Note: however, you can only control insertion and update to columns. query and deletion cannot control columns.
Disconnect/connect to the database
Disconn/conn
Alter table mytable add name varchar (10)