Youtube Channel

DCL statement

In DCL(Data control language) we have,
  • grant
  • revoke
 Grant : To give access to table on different schema we use grant.
SQL> grant select on emp to system;

Grant succeeded.

SQL> conn system/admin
Connected.
SQL> select * from kkm.emp;

        ID NAME                SALARY                                          
---------- --------------- ----------                                          
         1 mohan                 1500                                          
         3 suresh                7700                                          
         4 sohan                 1900                                          
         7 sujit                 2200                                          

Revoke: To take back the access on a table from another schema we use revoke.


SQL> revoke select on emp from system;

Revoke succeeded.


Next PostNewer Post Previous PostOlder Post Home

0 comments: