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 | Auto-increment column creation time |
| MODIFY_TIME | datetime(6) | YES | Modified At of Auto-Increment Column |
| AUTO_INCREMENT_KEY | bigint(20) | NO | The KEY of the table containing the auto-increment column |
| 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, through Insert The value explicitly specified for the auto-increment column in the statement is greater than the current value of the auto-increment column. |
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
References
For more information about auto-increment columns, see Define an auto-increment column.