在Oracle中给scott用户授权select的同时又否认select,语句如何写?授权完后在运用的时候,到底是授全还是否认了?

解决方案 »

  1.   

    grant select on table_name to  scott;
    revoke select on table_name from scott;
    否认了。。
      

  2.   


    这个肯定是正确的,revoke的权限必须是已经grant过的,否则是会出错的
    revoke select on test1.testtab from test2
    *
    ERROR at line 1:
    ORA-01927: cannot REVOKE privileges you did not grant
      

  3.   


    grant select tablename to scott;
    --中间若干过程
    remove select tablename to scott;
      

  4.   


    remove之后,就不能用了,当然是 否认了!