on 03-06-2009 11:47 AM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks to Elkes and Lars..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.