grant.md 541 字节
Newer Older
M
Mars Liu 已提交
1 2
# 授权

M
having  
Mars Liu 已提交
3
管理员要给用户 joe 授权,允许他查询 emplyee 表,应用哪一条语句?
M
Mars Liu 已提交
4 5 6

## 答案

M
having  
Mars Liu 已提交
7 8
```mysql
grant select on table employee to joe;
M
Mars Liu 已提交
9 10 11 12 13 14
```

## 选项

### 权限名错误

M
having  
Mars Liu 已提交
15 16
```mysql
grant query on table employee to joe;
M
Mars Liu 已提交
17 18 19 20
```

### 权限名错误

M
having  
Mars Liu 已提交
21 22
```mysql
grant read on table employee to joe;
M
Mars Liu 已提交
23 24 25 26
```

### 操作关键词错误

M
having  
Mars Liu 已提交
27 28
```mysql
grant select on table employee of joe;
M
Mars Liu 已提交
29 30 31 32
```

### 操作错误

M
having  
Mars Liu 已提交
33 34
```mysql
grant select on table employee.* of joe;
M
Mars Liu 已提交
35 36 37 38
```

### 权限过高

M
having  
Mars Liu 已提交
39 40
```mysql
grant all on table employee to joe;
M
Mars Liu 已提交
41
```