Skip to main content

DESC SEQUENCE

Introduced or updated: v1.2.742

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
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Explore Databend Cloud for FREE
Low-cost
Fast Analytics
Easy Data Ingestion
Elastic Scaling
Try it today