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® DB2® LUW | No | N/A | Yes, see details |
IBM Informix® | ROWID |
INTEGER |
Yes, native SQL feature |
IBM Netezza | No | N/A | Yes, see details |
Microsoft™ SQL Server (2) | 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 | OID |
internal type | Yes with pre-12 versions. No since version 12, see details |
SAP HANA® | No | N/A | No, see details |
SQLite | ROWID |
BIGINT |
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
.