角色--成组管理用户的方法

来源:互联网 发布:notepad 排版json 编辑:程序博客网 时间:2024/05/18 16:39

create role nurse; //创建一个角色

//给角色赋予权利

grant insert on table1 to nurse;

grant update on table1 to nurse;

grant delete on table2 to nurse;

//角色赋给用户

grant nurse to zhangsan;

grant nurse to lisi;

//procedure 执行权利

grant execute on procedure1 to nurse;