Details

    • Q2/2025 Development

    Description

      The IDENTITY column feature as per SQL standard as well as at least Oracle 12 and up and DB2:

      CREATE TABLE tab1(c1 INTEGER GENERATED ALWAYS AS IDENTITY,
         c2 INTEGER GENERATED BY DEFAULT AS IDENTITY);
      

      Oracle supports similar options as a SEQUENCE to an IDENTITY column. An Identity column need not be a primary key, but it can be. With GENERATED ALWAYS is used, the user cannot specify a value, only the generated value is allowed.

      Oracle-21 syntax for IDENTITY columns:

      identity_clause::=  GENERATED [ ALWAYS | BY DEFAULT [ ON NULL ] ] AS IDENTITY [ ( identity_options ) ]
       
      identity_options::=   { START WITH ( integer | LIMIT VALUE )
                          | INCREMENT BY integer
                          | ( MAXVALUE integer | NOMAXVALUE )
                          | ( MINVALUE integer | NOMINVALUE )
                          | ( CYCLE | NOCYCLE )
                          | ( CACHE integer | NOCACHE )
                          | ( ORDER | NOORDER ) }...
      

      Attachments

        Activity

          People

            nikitamalyavin Nikita Malyavin
            karlsson Anders Karlsson
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.