Oracle SQL Developer – Create auto incrementing primary key

To make primary key auto increment in Oracle, you need to set the identity column property for that primary key.

Right click on the table and select Edit.

In Edit Table window, select columns, and then select your primary key column.

Go to Identity Column tab and select Column Sequence as Type. This will create a trigger and a sequence, and associate the sequence to primary key.

OracleAutoIncrement

Advertisements

4 thoughts on “Oracle SQL Developer – Create auto incrementing primary key

  1. Fantastic! I’ve been searching for about an hour on how to do this and have tried 3 ‘solutions’ which haven’t actually worked. My sanity thanks you…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s