Get started Bring yourself up to speed with our introductory content.

ROWID data type in V5R2

I'm working with iSeries V5. I have a table that I have to insert rows selected from another table. But I also have to put row numbers for each inserted row, because more than one user has to use this application. Can you advise me on how to accomplish this?

There's a new ROWID data type in V5R2 that can be used to have DB2 generate a 40-byte unique identifier for each new row in a table. You might also consider writing a Before Insert trigger that "intercepts" the insert request and computes a unique identifier for that row.


Search400.com's targeted search engine: Get relevant information on DB2/400.

The Best Web Links: tips, tutorials and more.

Check out this online event, Getting the Most out of SQL & DB2 UDB for the iSeries.

Dig Deeper on iSeries SQL commands and statements

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.