Row identifiers
A row in a table is uniquely identified by a rowid which is an opaque token. Many KDB API calls, such as KI_READ, can return a rowid together with the row buffer. This rowid can be later used to update the row or to reload it afresh.
This rowid also contains the handle number of the table that the rowid came from. KCML will error if a rowid returned from an operation on one handle is used on another handle opened on a different table.
The size of the rowid token depends on the database connection. On the default connection you should be prepared to accept up to 4 bytes while on a KDB7 is 6 bytes. An Oracle database may require up to 18 bytes for some types of table.
To be certain you are using the right size you should always use the _KDB_ROWID record for the rowid.
DIM rowid$_KDB_ROWID