Search code examples
databasesnowflake-cloud-data-platformsequenceprimary-keyauto-increment

SNOWFLAKE Sequence Creation Issue


In SNOWFLAKE database, I was trying to create 2 sequences under same name but with case sensitive and for one sequence I was trying to increment by 1 and the other sequence I was trying to increment based on the value from staging table.

To explain better.

The below screenshot is the current sequence list in my SNOWFLAKE database, now I want to add two new sequences called scholarid (Small letters) with increment by 1 and create another sequence called SCHLARID (Captial Letters) with increment by next value (428846) generated from another table.

enter image description here

I tried creating the first sequence with small letters but it gets created in the list only as Capital letters and when I try to create the second one with Capital letters, it throws an error as below

enter image description here

I am not sure why I am not able to create 2 sequnces like something similar to AddressID (One with lower case and incremented by 1 and other with Capital letters and incremented in 44846)

Could someone please help me?


Solution

  • Identifiers are automatically converted into uppercase if you do not specify any quotes.

    You have to use "AddressID" to have the final name AdressID and not ADDRESSID.