Apex: Caveat PK column name length


It is highly encouraged in Apex to use system generated, single primary key columns whenever possible.

When choosing multi-column, composed primary keys, you quickly get in trouble when dealing with the standard MRU Processes. This is limited to handling tables with at most a 2 column primary key.

So, it is a good practice to work with auto-generated, sequence-based PK’s, on 1 column.


There is one caveat that you should be aware of.


Within Oracle, the maximum length of a column name is 30 characters.
However, when you plan to build tabular forms on your tables, the length of the primary key column name may not exceed 22 characters.

About these ads

One thought on “

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