Sequences and columns: Changes to SHOW command, view, and GET_DDL function output¶
Attention
This behavior change is in the 2023_06 bundle.
For the current status of the bundle, refer to Bundle History.
In the current Snowflake release, Snowflake has introduced a new ORDER and NOORDER parameter for sequences and table columns:
ORDER specifies that the values generated for a sequence or auto-incremented column are in increasing order.
NOORDER specifies that the values are not guaranteed to be in increasing order.
These new parameters appear in the output of the commands, functions, and views.
The output of the following commands and views includes this new ordered column:
The SHOW SEQUENCES command
The DESCRIBE SEQUENCE command
The Information Schema SEQUENCES view
The Account Usage SEQUENCES view
Column Name |
Data Type |
Description |
---|---|---|
|
TEXT |
Specifies whether or not the values are generated in increasing order.
|
In the output of the SHOW COLUMNS command, the autoincrement
column includes the ORDER or NOORDER parameter:
- Previously:
If the column auto-increments by 1 with the starting value of 1, the
autoincrement
column contains:start 1 increment 1
- Currently:
If the column has the ORDER parameter set, the
autoincrement
column contains:start 1 increment 1 order
If the column has the NOORDER parameter set, the
autoincrement
column contains:start 1 increment 1 noorder
The output of the Information Schema and Account Usage COLUMNS views includes a new identity_ordered
column:
Column Name |
Data Type |
Description |
---|---|---|
|
TEXT |
Specifies whether or not this column is an identity column with generated values in increasing order.
|
Finally, the output of the GET_DDL function will include the ORDER and NOORDER parameter for sequences and columns.
- Currently:
If the column auto-increments by 1 with the starting value of 1, the output of the GET_DDL function does not include the ORDER or NOORDER parameters:
create or replace table MYTABLE( MYCOL ... start 1 increment 1 ...
- Pending:
If the column has the ORDER parameter set, the GET_DDL output includes the ORDER parameter:
create or replace table MYTABLE( MYCOL ... start 1 increment 1 order ...
If the column has the NOORDER parameter set, the GET_DDL output includes the NOORDER parameter:
create or replace table MYTABLE( MYCOL ... start 1 increment 1 noorder ...
Ref: 1225