# Non-Clustered Index for Hidden Primary Key
```
tidb> CREATE TABLE test.example_table1 (
  example_id BIGINT,
  example_content VARCHAR(60)
);

tidb> CREATE TABLE test.example_table2 (
  example_id CHAR(10),
  example_content VARCHAR(60)
);

tidb> SELECT TABLE_NAME, TIDB_PK_TYPE
  FROM information_schema.tables 
  WHERE table_schema = 'test' 
  AND table_name in ('example_table1','example_table2');

+----------------+--------------+
| TABLE_NAME     | TIDB_PK_TYPE |
+----------------+--------------+
| example_table2 | ~!@NONCLUSTERED@!~ |
| example_table1 | ~!@NONCLUSTERED@!~ |
+----------------+--------------+
```

![`smart`](NonClusteredTableWithoutPrimaryKey_en_001_20231116.png)
------------------------------------------------------------------------------
For non-clustered hidden primary key, each row also maps to a single key-value pair entry in TiKV. TiDB generates a hidden primary key column named `_tidb_rowid` in this scenario.

The `_tidb_rowid` is a 64-bit signed integer (BIGINT). Each row has a unique `_tidb_rowid` that is used to locate and access the corresponding data in the underlying storage engine. `_tidb_rowid` is a hidden column in TiDB and cannot be viewed through the `SHOW COLUMNS` command. It is important to note that `_tidb_rowid` is automatically generated and managed by TiDB and cannot be directly modified or manipulated manually.

To create a table with a non-clustered hidden primary key, you can simply create a table without specifying a primary key as shown in the slide.

The TiKV `KV` entry comprises the following `key` and `value`:
- The key is the hidden primary key column `_tidb_rowid` with the table `ID` prefix.
- The value consists all columns of the row.
