# Schema Compare - Identity Column

**URL:** <https://forums.toadworld.com/t/schema-compare-identity-column/41639>\
**Category:** Toad for Oracle & DevOps Toolkit\
**Created:** [September 3, 2018, 2:04pm UTC](https://forums.toadworld.com/t/schema-compare-identity-column/41639 "2018-09-03T14:04:36Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![ButtonPusher](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/buttonpusher/32/147_2.png) [@ButtonPusher](https://forums.toadworld.com/u/ButtonPusher)\
**Post date:** [September 3, 2018, 2:04pm UTC](https://forums.toadworld.com/t/schema-compare-identity-column/41639/1 "2018-09-03T14:04:36Z")

</div>

Hi

I am trying to move a table from test to prod.

The table contains a identity column defined as **COL\_PK NUMBER GENERATED BY DEFAULT AS IDENTITY**

When I execute a Schema Compare then the resulting script returns **MASTER\_APP\_FACT\_DIM\_ID NUMBER GENERATED AS IDENTITY**. It is missing **BY DEFAULT**.

Is this normal behavior? Is it possible to have Toad create the script for the table with the full definition?

Br

An

---

<div class="post-metadata">

**Author:** ![JohnDorlon](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/johndorlon/32/9997_2.png) [@JohnDorlon](https://forums.toadworld.com/u/JohnDorlon)\
**Post date:** [September 4, 2018, 4:13pm UTC](https://forums.toadworld.com/t/schema-compare-identity-column/41639/2 "2018-09-04T16:13:31Z")

</div>

What version of Toad are you using? I just tried this in the beta and it worked as expected for me.

I created these tables:

create table comp1.comp\_test  
(col1 number GENERATED by default AS IDENTITY,  
col2 number,  
col3 date);

create table comp2.comp\_test  
(col1 number GENERATED always AS IDENTITY,  
col2 number,  
col3 date);

and then when I ran the schema compare, this was the sync script:

ALTER TABLE COMP2.COMP\_TEST  
MODIFY(COL1 GENERATED BY DEFAULT AS IDENTITY ( MAXVALUE 9999999999999999999999999999 MINVALUE 1 NOCYCLE CACHE 20 NOORDER NOKEEP));

If your set up was different, please provide details so I can reproduce it.

Thanks.

---

<div class="post-metadata">

**Author:** ![JohnDorlon](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/johndorlon/32/9997_2.png) [@JohnDorlon](https://forums.toadworld.com/u/JohnDorlon)\
**Post date:** [September 5, 2018, 11:55am UTC](https://forums.toadworld.com/t/schema-compare-identity-column/41639/4 "2018-09-05T11:55:13Z")

</div>

What version of Toad are you using?

For me, when the target table does not exist, the sync script creates it with this statement:

CREATE TABLE COMP2.COMP\_TEST  
(  
COL1 NUMBER GENERATED BY DEFAULT AS IDENTITY ( START WITH 1 MAXVALUE 9999999999999999999999999999 MINVALUE 1 NOCYCLE CACHE 20 NOORDER NOKEEP),  
COL2 NUMBER,  
COL3 DATE  
)  
TABLESPACE USERS  
PCTUSED 0  
PCTFREE 10  
INITRANS 1  
MAXTRANS 255  
STORAGE (  
PCTINCREASE 0  
BUFFER\_POOL DEFAULT  
FLASH\_CACHE DEFAULT  
CELL\_FLASH\_CACHE DEFAULT  
)  
LOGGING  
NOCOMPRESS  
NO INMEMORY  
NOCACHE  
RESULT\_CACHE (MODE DEFAULT)  
NOPARALLEL  
MONITORING;

---

<div class="post-metadata">

**Author:** ![JohnDorlon](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/johndorlon/32/9997_2.png) [@JohnDorlon](https://forums.toadworld.com/u/JohnDorlon)\
**Post date:** [September 5, 2018, 3:45pm UTC](https://forums.toadworld.com/t/schema-compare-identity-column/41639/6 "2018-09-05T15:45:37Z")

</div>

I tried Toad 12.12, against Oracle 12.2, with storage and other options unchecked. I got this result:

CREATE TABLE COMP2.COMP\_TEST  
(  
COL1 NUMBER GENERATED BY DEFAULT AS IDENTITY ( START WITH 1 MAXVALUE 9999999999999999999999999999 MINVALUE 1 NOCYCLE CACHE 20 NOORDER NOKEEP),  
COL2 NUMBER,  
COL3 DATE  
);

Please send me the full DDL for your table. Maybe there is some other factor.

---

<div class="post-metadata">

**Author:** ![JohnDorlon](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/johndorlon/32/9997_2.png) [@JohnDorlon](https://forums.toadworld.com/u/JohnDorlon)\
**Post date:** [September 6, 2018, 1:42pm UTC](https://forums.toadworld.com/t/schema-compare-identity-column/41639/8 "2018-09-06T13:42:35Z")

</div>

I can reproduce this now.

If you uncheck “sequences” in the object types to compare, it will work.

I will have this fixed soon.

---

<div class="post-metadata">

**Author:** ![JohnDorlon](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/johndorlon/32/9997_2.png) [@JohnDorlon](https://forums.toadworld.com/u/JohnDorlon)\
**Post date:** [September 6, 2018, 2:23pm UTC](https://forums.toadworld.com/t/schema-compare-identity-column/41639/9 "2018-09-06T14:23:25Z")

</div>

Fixed for next beta and 13.1. Thank you for reporting this and for your patience while I tried to figure it out!

---

<div class="post-metadata">

**Author:** ![drdevine](https://avatars.discourse-cdn.com/v4/letter/d/6de8d8/32.png) [@drdevine](https://forums.toadworld.com/u/drdevine)\
**Post date:** [April 22, 2026, 11:01am UTC](https://forums.toadworld.com/t/schema-compare-identity-column/41639/12 "2026-04-22T11:01:29Z")

</div>

I'm still getting this issue with 26.1.193.8012. I'm comparing a schema between 12c and 19c and columns number (38) generated always as identity. Even just viewing the Script tab for a table shows  
ID NUMBER(38) GENERATED BY DEFAULT AS IDENTITY ( START WITH 1 MAXVALUE 9999999999999999999999999999 MINVALUE 1 NOCYCLE CACHE 20 NOORDER NOKEEP) NOT NULL  
instead of  
ID NUMBER GENERATED BY DEFAULT AS IDENTITY,

---

<div class="post-metadata">

**Author:** ![JohnDorlon](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/johndorlon/32/9997_2.png) [@JohnDorlon](https://forums.toadworld.com/u/JohnDorlon)\
**Post date:** [April 22, 2026, 12:23pm UTC](https://forums.toadworld.com/t/schema-compare-identity-column/41639/13 "2026-04-22T12:23:23Z")

</div>

Hi Dan,

All of this stuff: `( START WITH 1 MAXVALUE 9999999999999999999999999999 MINVALUE 1 NOCYCLE CACHE 20 NOORDER NOKEEP)` is just sequence parameters. It's not a bug.

I tested to make sure `GENERATED ALWAYS/BYDEFAULT` is coming out correctly in the script tab as well as schema compares and for me it is. If you have found a case where it does not, can you give me some more details like full "create" script of the table in each schema, as well as a screen shot of your schema compare options in these places?

 ![image](https://global.discourse-cdn.com/quest/original/3X/b/6/b65602f8621fbe424b3cf35a499530a05fe88d71.png)

 ![image](https://global.discourse-cdn.com/quest/original/3X/3/3/3385ece479a2f6aa516ffd9558b3cb043e47b31e.png)

Thanks

-John

---

<div class="post-metadata">

**Author:** ![drdevine](https://avatars.discourse-cdn.com/v4/letter/d/6de8d8/32.png) [@drdevine](https://forums.toadworld.com/u/drdevine)\
**Post date:** [April 22, 2026, 1:58pm UTC](https://forums.toadworld.com/t/schema-compare-identity-column/41639/14 "2026-04-22T13:58:51Z")

</div>

![image.png](https://mail.google.com/mail/u/0?ui=2&ik=1ea47eabdb&attid=0.1&permmsgid=msg-a:r7935772459834706570&th=19db579972913e8b&view=fimg&fur=ip&permmsgid=msg-a:r7935772459834706570&sz=s0-l75-ft&attbid=ANGjdJ9steeb3TE5etjjEZDCGWXXoABdkfK8SYstKF-VuE6xdyyLlqjeP1T0aC-NOnBD-CkagmcyAClpuK890t8wpCHtGdZXY0GBH7u8y5clxJFG3z0oslK1tJUD8DE&disp=emb&realattid=ii_moa3gpmp0&zw)

It is detecting that the right pane has an additional NOSCALE parameter to the inline sequence, but I'm not sure why the sequence shows at all.

The example table dll:

```sql
CREATE TABLE 
    AAATEXT 
    ( 
        ACRONYM VARCHAR2(3) DEFAULT 'BBB' NOT NULL, 
        SEC_ID NUMBER(38) DEFAULT 0 , 
        GUID_ID VARCHAR2(40) DEFAULT 'SYS_GUID() ' NOT NULL, 
        ID NUMBER(38) GENERATED BY DEFAULT AS IDENTITY, 
        A_ID INTEGER, 
        B_ID INTEGER, 
        EXTERNAL_CODE VARCHAR2(100), 
        EXTERNAL INTEGER DEFAULT 0 NOT NULL, 
        RATIO NUMBER(6,4) DEFAULT 1.0000 NOT NULL, 
        STATUS_CODE VARCHAR2(10) DEFAULT 'I' NOT NULL, 
        A_DATE DATE NOT NULL, 
        DETAIL VARCHAR2(200), 
        A_AMOUNT NUMBER(30,12) 
    );

```

---

<div class="post-metadata">

**Author:** ![drdevine](https://avatars.discourse-cdn.com/v4/letter/d/6de8d8/32.png) [@drdevine](https://forums.toadworld.com/u/drdevine)\
**Post date:** [April 22, 2026, 1:59pm UTC](https://forums.toadworld.com/t/schema-compare-identity-column/41639/15 "2026-04-22T13:59:21Z")

</div>

![Screenshot 2026-04-22 094713.png](https://mail.google.com/mail/u/0?ui=2&ik=1ea47eabdb&attid=0.3&permmsgid=msg-a:r7935772459834706570&th=19db579972913e8b&view=fimg&fur=ip&permmsgid=msg-a:r7935772459834706570&sz=s0-l75-ft&attbid=ANGjdJ9TYkkKR1l3ybCst4JkJphdInfRAm1tFnP3UUOBn3hjdkW-XuT4d4AlTdxWFrOGqHe69sMU-hPR5HZfWZIh7uSxDv54khpGbEbE6LYscKHoZxKhcDIntuAQo4w&disp=emb&realattid=ii_moa41g664&zw)

---

<div class="post-metadata">

**Author:** ![JohnDorlon](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/johndorlon/32/9997_2.png) [@JohnDorlon](https://forums.toadworld.com/u/JohnDorlon)\
**Post date:** [April 22, 2026, 2:05pm UTC](https://forums.toadworld.com/t/schema-compare-identity-column/41639/17 "2026-04-22T14:05:35Z")

</div>

Sorry about that. That's the default setting for new users on the forum. I forgot about that.

I just increased your privileges on the form. Please try again with your screen shot. Thanks

---

<div class="post-metadata">

**Author:** ![JohnDorlon](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/johndorlon/32/9997_2.png) [@JohnDorlon](https://forums.toadworld.com/u/JohnDorlon)\
**Post date:** [April 22, 2026, 2:09pm UTC](https://forums.toadworld.com/t/schema-compare-identity-column/41639/18 "2026-04-22T14:09:17Z")

</div>

> [@drdevine](#):
>
> I'm not sure why the sequence shows at all

It shows the sequence because when you create a table with an IDENTITY column, Oracle creates a sequence behind the scenes to implement it. The sequence name is something like `ISEQ$$_` followed by 6 digit number.

The SQL that Toad is producing is valid. The sequence parameters that you see come from that sequence.

I just used your script to create that table on a schema in Oracle version 12.2.0.1 and one in 19.3.0.0.0 and schema compare detected no differences when I compared the schemas.
