grant.md 593 字节
Newer Older
M
Mars Liu 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
# 授权

管理员要给用户 fred 授权,允许他查询 emplyee 表,应用哪一条语句?

## 答案

```postgresql
grant select on table employee to fred;
```

## 选项

### 权限名错误

```postgresql
grant query on table employee to fred;```
```

### 权限名错误

```postgresql
grant read on table employee to fred;```
```

### 操作关键词错误

```postgresql
grant select on table employee of fred;```
```

### 操作错误

```postgresql
grant select on table employee.* of fred;```
```

### 权限过高

```postgresql
grant all on table employee to fred;```
```