• Reference
  • Version · 6.0
  • Change Automation Reference

Snowflake createSequence

Last updated: September 29, 2026

Creates a new sequence in Snowflake. Sequences generate unique numeric values and are commonly used for auto-incrementing primary keys.

Note: Automatic rollback drops the sequence.

Available attributes

Attribute

Type

Description

Required

catalogName

String

Name of the catalog (database) where the sequence is created

No

schemaName

String

Name of the schema where the sequence is created

No

sequenceName

String

Name of the sequence to create

Yes

orReplace

Boolean

Replace the sequence if it exists using OR REPLACE*

No

ifNotExists

Boolean

Only create if the sequence doesn't exist using IF NOT EXISTS*

No

startValue

Long

Initial value for the sequence

No

incrementBy

Long

Value to increment by for each sequence value

No

ordered

Boolean

Guarantee ordered sequence values (true for ORDER)

No

comment

String

Comment describing the sequence

No

* orReplace and ifNotExists are mutually exclusive.

Snapshot and diff support

As of Liquibase Secure 6.0, Snowflake sequences round-trip through the database inspection commands. snapshot records the ordered and comment properties, diff reports a difference when either one differs, and generate-changelog emits pro-snowflake:createSequence with both attributes set.

Note: Snapshots taken before Liquibase Secure 6.0 do not record ordered or comment. Regenerate any stored snapshots of Snowflake databases that contain sequences. If you compare against an older snapshot, diff reports differences that do not exist.

generate-changelog does not emit minValue, maxValue, cycle, or cacheSize for Snowflake sequences. Snowflake rejects those attributes on CREATE SEQUENCE.

loading

loading

loading

loading