bookoperator角色授予连接数据库create session权限,和对图书管理系统中各个表的SELECT,UPDATE,INSERT,DELETE权限。 将bookoperator角色授予bookuser用户 GRANT bookoperator,create session to bookuser;
时间: 2024-02-25 18:58:52 浏览: 63
数据库用户创建与赋权限
是的,你可以使用以下语句将`bookoperator`角色授予`bookuser`用户,并同时授予`create session`权限和对图书管理系统中各个表的`SELECT`, `UPDATE`, `INSERT`, `DELETE`权限:
```sql
GRANT bookoperator, create session, SELECT, UPDATE, INSERT, DELETE ON bookstore.type TO bookuser;
GRANT bookoperator, create session, SELECT, UPDATE, INSERT, DELETE ON bookstore.grade TO bookuser;
GRANT bookoperator, create session, SELECT, UPDATE, INSERT, DELETE ON bookstore.book TO bookuser;
GRANT bookoperator, create session, SELECT, UPDATE, INSERT, DELETE ON bookstore.manager TO bookuser;
GRANT bookoperator, create session, SELECT, UPDATE, INSERT, DELETE ON bookstore.student TO bookuser;
GRANT bookoperator, create session, SELECT, UPDATE, INSERT, DELETE ON bookstore.card TO bookuser;
GRANT bookoperator, create session, SELECT, UPDATE, INSERT, DELETE ON bookstore.lend TO bookuser;
```
执行以上语句后,`bookoperator`角色将被授予`bookuser`用户,并且`bookuser`用户将获得对`bookstore`用户下的所有表进行`SELECT`, `UPDATE`, `INSERT`, `DELETE`操作的权限。
阅读全文