cancel
Showing results for 
Search instead for 
Did you mean: 

rowid equivalent in maxdb

Former Member
0 Kudos

Hello there,

I want to fetch a set of records from the table using ROWID. but MAXDB says "unknown column name:ROWID"

So, what is the first column in table uniquely identifying the row if its not "ROWID"..?

Waiting for reply.

Accepted Solutions (1)

Accepted Solutions (1)

lbreddemann
Active Contributor
0 Kudos

Just to add to Elkes answer:

In Oracle you usually use the ROWID to get a direct access to the data, basically for speed.

This is possible because the ROWID contains the physical address of the row.

MaxDB moves a page physically whenenver it is modified - therefore you can never tell where a certain row will be stored at any point in time.

That said, the primary key of each table is per definition the quickest way to retrieve a single row in MaxDB.

If you defined a primary key (which should be done in any case for a good entitiy design) than you don't need a pseudo-column like ROWID. You would simply use the primary key columns.

Besides all this: even for Oracle it's not exactly the best choice to work with rowids as these can change nowadays. Think of partitions, think of table shrinking, think of reorganisations...

regards,

Lars

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks to Elkes and Lars..

Former Member
0 Kudos

Hallo,

if you define a PRIMARY KEY for your table, then all of these columns being part of the primary key, all of these columns together uniquely identify one row.

That means, your data is stored in primary-key-sequence. The primary key is no (implicitly created) unique index.

If you do NOT specify a PRIMARY KEY by your own, then internally a primary key is added:

one column, named SYSKEY char (8) byte. This can be handled similar to rowid.

Elke