📣
TiDB Cloud Premium is now in public preview. Unlimited growth, instant elasticity, advanced security for enterprise workloads. Try it out →

DESC SEQUENCE



Describes the properties of a sequence.

Syntax

DESC SEQUENCE <sequence_name>
ParameterDescription
sequence_nameThe name of the sequence to describe. This will display all properties of the sequence including start value, interval, current value, creation timestamp, last update timestamp, and any comment.

Examples

-- Create a sequence CREATE SEQUENCE seq; -- Use the sequence in an INSERT statement CREATE TABLE tmp(a int, b uint64, c int); INSERT INTO tmp select 10,nextval(seq),20 from numbers(3); -- Describe the sequence DESC SEQUENCE seq; ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ name │ startintervalcurrent │ created_on │ updated_on │ comment │ ├────────┼────────┼──────────┼─────────┼────────────────────────────┼────────────────────────────┼──────────────────┤ │ seq │ 1142025-05-20 02:48:49.7493382025-05-20 02:49:14.302917NULL │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

Was this page helpful?