--通过该视图(外模式)访问数据createorreplaceview user_salary asselect*from salary
where users =user::varchar(64);grantselectontable user_salary to tjbb1;grantselectontable user_salary to tjbb2;
列级权限控制
希望普通用户只能查看非工资的列,只有领导才能看工资列
--回收表的public权限revokeallON salary frompublic;--授权列权限grantselect(id,name,users)ontable salary to lingdao;grantselect(id,name,amount,users)ontable salary to commonuser;