Using Rowids

In HCL OneDB™, you can use the rowid column that is associated with a table row as a property of the row. The rowid column is essentially a hidden column in nonfragmented tables and in fragmented tables that were created with the WITH ROWIDS clause. The rowid column is unique for each row, but it is not necessarily sequential. It is recommended, however, that you use primary keys as an access method rather than exploiting the rowid column.

The following examples use the ROWID keyword in a SELECT statement:
SELECT *, ROWID FROM customer;

SELECT fname, ROWID FROM customer ORDER BY ROWID; 

SELECT HEX(rowid) FROM customer WHERE customer_num = 106;

The last example shows how to get the page number (the first six digits after 0x) and the slot number (the last two digits) of the location of your row.

You cannot use the ROWID keyword in the select list of the Projection clause of a query that contains an aggregate function.