grant select on table.field1,table.field2 to public;
create role role1;
grant grant select on table.field1,table.field2,table.field3,table.field4 to role role1;

解决方案 »

  1.   

    grant select on table.field1,table.field2,table.field3,table.field4 to role1;
      

  2.   

    create procedure name_pro(p_role in varchar2)
    as
    begin
    if p_role=... then  --有权限
    select * from tab;  --此处要用游标实行.
    else                --没有权限
    select Field1,Field2 from tab;
    end if;
    end;
    /
      

  3.   

    beckhambobo的建议有些偏差,问题是你怎么去返回结果呢。
      

  4.   

    建议用view
     create view viewname1 as select field1,filed2 from tablename;
     create view viewname2 as select field1,filed2,field3... from tablename;
    grant select on viewname1 to role1;
    grant select on viewname2 to role2;
      

  5.   

    像bird93(大嘴鹦鹉)也是一个方法,当然表的改动只要与视图所选选举的列无关,也不会有所影响。