# Projection
__*DISTINCT*__
__*as keyword*__
+ In the following queries, all rows in the planets 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 columns
    + **`AS`** is a keyword that declares an alias, it can be omitted
    + Table names can also be identified by aliases
+ For example:
```
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.

