Before writing a CREATE SEQUENCE statement:
- Read
references/parameters.mdto review all available parameters and their defaults. - For each parameter, decide whether the user's request implies a non-default value.
- Include only the parameters that differ from the default or that the user explicitly requested.
- Never use
CREATE OR REPLACE— always useCREATE SEQUENCE IF NOT EXISTSwhere supported. - Warn users that Snowflake does not guarantee gap-free sequence values; sequences are not suitable for gapless numbering requirements.
- The
STARTvalue cannot be modified after creation; confirm the correct starting value before generating DDL. - Use
ORDERonly when strictly sequential values are required;NOORDER(the default for most accounts) offers better concurrency performance.