Using ROWID columns
Automatic ROWID columns is not a common database feature.
Rowids are implicit primary keys generated by the database engine. Not all database servers support rowids:
Database Server Type | Rowid keyword | Rowid type | ROWID support |
---|---|---|---|
IBM® Informix® | ROWID |
INTEGER |
Yes, native SQL feature |
Microsoft™ SQL Server | No | N/A | No, see details |
Oracle® MySQL / MariadDB | No | N/A | No, see details |
Oracle Database Server | ROWID |
CHAR(18) |
Yes, see details |
PostgreSQL | No |
internal type | No, see details |
SAP HANA® | No | N/A | No, see details |
SQLite | ROWID |
BIGINT |
Yes, see details |
Dameng® | ROWID |
CHAR(18) |
Yes, see details |
Informix fills the sqlca.sqlerrd[6]
register with the ROWID
of the last updated row. This register is an
INTEGER
and cannot be filled with rowids having
CHAR(size)
type.
Search for ROWID
and sqlca.sqlerrd[6]
in your code and review
the code to remove the usage of rowids.
Instead of using ROWID
pseudo columns, consider to define PRIMARY
KEY
constraints in all your database tables, and use the primary key values instead of
rowids to identify rows. To fill the primary key value when inserting a new row, use a SEQUENCE
.