# Projection
__*DISTINCT*__
__*as keyword*__
+ In following queries, all rows in the planet table will be returned
  + `SELECT id, name FROM planets;` 
  + `SELECT * FROM planets;` 
  + `SELECT DISTINCT category_id FROM planets;` 
  + `SELECT DISTINCT sun_id Sun, category_id as 'Planet Category' FROM planets;` 
    + `Sun` and `'Plant Category'`  are aliases for the selected column
    + `as` is a keyword that declares an alias; it can be omitted
    + Table names can also be identified by aliases
```
tidb> SELECT DISTINCT sun_id Sun, category_id ~!@as@!~ 'Planet Category'
   -> FROM planets ~!@as@!~ p;
+---------------------+-----------------+
| Sun                 | Planet Category |
+---------------------+-----------------+
| 5764607523034234881 |               1 |
| 5764607523034234881 |               3 |
| 5764607523034234881 |               2 |
+---------------------+-----------------+
3 rows in set (0.01 sec)
```

------------------------------------------------------------
- ALL, DISTINCT, DISTINCTROW
  - Duplicate values may be included in the query result set. Specify DISTINCTT/DISTINCTROW to filter out duplicate rows in the query results; specify ALL to list all rows. The default is ALL.

