Ask the Expert

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.

==================================
MORE INFORMATION ON THIS TOPIC
==================================

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.


This was first published in June 2003

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: