正确答案是 B: `select * from student where sno='05880101' or sno='05880102'`。
分析:
1. `union` 操作用于合并两个或多个 `select` 语句的结果集。`union` 会去除重复的记录,并将两个查询的结果组合在一起。
2. 原始查询语句:
```sql
select * from student where sno='05880101'
union
select * from student where sno='05880102'
```
这表示从 `student` 表中选择学号为 `05880101` 或 `05880102` 的记录。
3. 选项分析:
- A: `select * from student where sno='05880101' and sno='05880102'`:这个语句试图选择学号同时为 `05880101` 和 `05880102` 的记录,这是不可能的,因为一个字段不可能同时有两个不同的值。
- B: `select * from student where sno='05880101' or sno='05880102'`:这个语句正确地表示选择学号为 `05880101` 或 `05880102` 的记录,与原始查询语义相同。
- C: `select * from student where sno='05880101'`:这个语句只会选择学号为 `05880101` 的记录,缺少了学号为 `05880102` 的记录。
- D: `select * from student where sno='05880102'`:这个语句只会选择学号为 `05880102` 的记录,缺少了学号为 `05880101` 的记录。
因此,选项 B 是与原始查询等价的正确答案。