【发布时间】:2021-08-05 21:42:12
【问题描述】:
我正在尝试从下表中查询所有记录,但没有重复,如下:
| ID | Name | Color |
|---|---|---|
| 1 | apple | Green |
| 2 | apple | red |
| 3 | apple | Yeelow |
| 4 | banana | green |
| 5 | banana | yellow |
| 6 | grape | green |
| 7 | grape | red |
| 8 | grape | white |
需要结果:
| ID | Name | Color |
|---|---|---|
| 1 | apple | Green |
| 2 | red | |
| 3 | Yeelow | |
| 4 | banana | green |
| 5 | yellow | |
| 6 | grape | green |
| 7 | red | |
| 8 | white |
【问题讨论】:
-
您使用哪种数据库系统?
-
我正在使用带有“DB Browser For SQLite”的 Android Studio
标签: sql sqlite duplicates where-clause