# Unique Secondary Index and `CLUSTERED` Index Table - Example

```9
CREATE TABLE components (
  ~!@id INT PRIMARY KEY CLUSTERED@!~,
  name VARCHAR(20),
  role VARCHAR(20),
  startup_order INT,
  ~!@UNIQUE KEY startup_order_idx (startup_order)@!~
);

INSERT INTO components VALUES
  ( 100, "TiDB", "SQL Layer", 30 ),
  ( 200, "TiKV", "KV Engine", 20 ),
  ( 300, "PD", "Manager", 10 ),
  ( 400, "TiFlash", "Columnar Engine", 40 );

SELECT id, startup_order FROM components;

+-----+---------------+
| id  | startup_order |
+-----+---------------+
| 300 |            10 |
| 200 |            20 |
| 100 |            30 |
| 400 |            40 |
+-----+---------------+
4 rows in set (0.00 sec)
```
![`smart`](UniqueIndexInClusteredPKExample_en_002_20231122.png)
------------------------------------------------------------------------------
Assume that the table `components` has an automatically assigned unique table ID, which is referred to as `t21`, and the unique index ID is `i2`. 

The diagram on the right shows you the TiKV entries for the unique secondary index and its underlying table.
