Note
This view is available starting with V4.0.0.
Overview
Displays information about all auto-increment columns in the current tenant.
Columns
Field Name |
Type |
Whether can be NULL |
Description |
|---|---|---|---|
| CREATE_TIME | datetime(6) | YES | Creation Time of Auto-Increment Column |
| MODIFY_TIME | datetime(6) | YES | Modified At of Auto-Increment Column |
| AUTO_INCREMENT_KEY | bigint(20) | NO | The KEY of the table where the auto-increment column is located. |
| COLUMN_ID | bigint(20) | NO | Column ID |
| AUTO_INCREMENT_VALUE | bigint(20) unsigned | YES | Next Available Auto-Increment Value |
| SYNC_VALUE | bigint(20) unsigned | NO | Synchronize values, that is, throughInsertThe statement displays the value of the specified auto-increment column, which is greater than its current value. |
Sample query
View all auto-increment columns of the current tenant.
obclient [oceanbase]> SELECT * FROM oceanbase.DBA_OB_AUTO_INCREMENT;
The query result is as follows:
+----------------------------+----------------------------+--------------------+-----------+----------------------+------------+
| CREATE_TIME | MODIFY_TIME | AUTO_INCREMENT_KEY | COLUMN_ID | AUTO_INCREMENT_VALUE | SYNC_VALUE |
+----------------------------+----------------------------+--------------------+-----------+----------------------+------------+
| 2025-02-20 14:45:50.310872 | 2025-02-20 14:45:50.310872 | 500007 | 16 | 1 | 0 |
+----------------------------+----------------------------+--------------------+-----------+----------------------+------------+
1 row in set
