在SQL中,(2)对新建用户李勇授予school数据库中students表的select权限。 (3)将赋予用户李勇的对students表的select权限收回。 (4)创建一个数据库角色,该角色拥有对上述school数据库中四张表的select和insert权限,然后使用该角色给所有用户赋予这些权限。
时间: 2023-06-04 07:08:52 浏览: 124
这是一个关于SQL权限管理的问题,属于技术问题,我可以回答。
(2)授权新建用户李勇对school数据库中students表的select权限:
GRANT SELECT ON school.students TO '李勇';
(3)收回用户李勇对students表的select权限:
REVOKE SELECT ON school.students FROM '李勇';
(4)创建一个数据库角色,并授予该角色对四张表的select和insert权限,然后将该角色授权给所有用户:
CREATE ROLE role_name;
GRANT SELECT, INSERT ON school.* TO role_name;
GRANT role_name TO PUBLIC;
阅读全文
相关推荐
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![txt](https://img-home.csdnimg.cn/images/20241231045021.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![-](https://img-home.csdnimg.cn/images/20241231044833.png)
![-](https://img-home.csdnimg.cn/images/20241231045053.png)
![-](https://img-home.csdnimg.cn/images/20241231044955.png)
![-](https://img-home.csdnimg.cn/images/20241231044736.png)
![-](https://img-home.csdnimg.cn/images/20241231045021.png)