Data Control Language

Data Control Language: This used to give and remove permissions to users on database objects.

GRANT: Used to give permission on database objects for users. We can give more than one permissions at a time to more than one users but not to more than one table.

Syntax:

GRANT permissions on database_object to user_name;

Example:

GRANT connect to pinnapa;
GRANT SELECT on emp to pinnapa;
GRANT DELETE on emp to pinnapa;
GRANT INSERT, DELETE, SELECT on emp to pinnapa;

Grant permissions on columns

GRANT INSERT(empno, ename, job, deptno) on emp to pinnapa;

To change the password:

sql> alter user pinnapa identified by ******;

Revoke:
To remove user permissions on objects.

Example:

sql>revoke connect from pinnapa;

Powered by k2schools