Lab-verifiedReproduced and fixed on Oracle AI Database 26ai Free 23.26.3.0.0 · 2026-11-30 · container image gvenzl/oracle-free:23-slim
23ai/26ai shows ORA-01410 as "The ROWID is invalid." (older versions: "invalid ROWID"). It appears when a string compared with rowid can't be a ROWID for the table being read.
Both cases below came from application-style code that passes a ROWID around in a bind variable.
01The primary key value is passed instead of the ROWID
The screen sent the order number '123' into :p_key, and the UPDATE used WHERE rowid = :p_key. A real ROWID looks like AAASfaAAYAAAAANAAA (18 characters), so '123' failed with ORA-01410.
Compare the key with its own column: WHERE order_id = TO_NUMBER(:p_key) updated 1 row.
Setup
CREATE TABLE orders (order_id NUMBER PRIMARY KEY, status VARCHAR2(10));
INSERT INTO orders VALUES (123, 'NEW');
COMMIT;Table created.
1 row created.
Commit complete.VARIABLE p_key VARCHAR2(30)
EXEC :p_key := '123'
UPDATE orders SET status = 'PAID' WHERE rowid = :p_key;PL/SQL procedure successfully completed.
UPDATE orders SET status = 'PAID' WHERE rowid = :p_key
*
ERROR at line 1:
ORA-01410: The ROWID is invalid.
Help: https://docs.oracle.com/error-help/db/ora-01410/SELECT ROWIDTOCHAR(rowid) AS row_id, order_id FROM orders;ROW_ID ORDER_ID
------------------ ----------
AAASfaAAYAAAAANAAA 123
1 row selected.VARIABLE p_key VARCHAR2(30)
EXEC :p_key := '123'
UPDATE orders SET status = 'PAID' WHERE order_id = TO_NUMBER(:p_key);
ROLLBACK;PL/SQL procedure successfully completed.
1 row updated.
Rollback complete.02A ROWID read from one table is used on another table
The ROWID was read from orders and then used in SELECT ... FROM order_items WHERE rowid = :p_rid. The value is a valid ROWID, but it points into another table, so Oracle returned ORA-01410.
DBMS_ROWID.ROWID_OBJECT showed object 75740 for the ROWID, while ORDER_ITEMS is object 75742. Using the ROWID on orders worked, and joining order_items to orders by order_id returned the line.
Setup
CREATE TABLE orders (order_id NUMBER PRIMARY KEY, status VARCHAR2(10));
CREATE TABLE order_items (order_id NUMBER, line_no NUMBER, qty NUMBER);
INSERT INTO orders VALUES (1, 'NEW');
INSERT INTO order_items VALUES (1, 1, 5);
COMMIT;Table created.
Table created.
1 row created.
1 row created.
Commit complete.VARIABLE p_rid VARCHAR2(30)
EXEC SELECT ROWIDTOCHAR(rowid) INTO :p_rid FROM orders WHERE order_id = 1
SELECT order_id, line_no, qty FROM order_items WHERE rowid = :p_rid;PL/SQL procedure successfully completed.
SELECT order_id, line_no, qty FROM order_items WHERE rowid = :p_rid
*
ERROR at line 1:
ORA-01410: The ROWID is invalid.
Help: https://docs.oracle.com/error-help/db/ora-01410/SELECT DBMS_ROWID.ROWID_OBJECT(o.rowid) AS orders_obj, (SELECT data_object_id FROM user_objects WHERE object_name = 'ORDER_ITEMS') AS items_obj FROM orders o WHERE o.order_id = 1;ORDERS_OBJ ITEMS_OBJ
---------- ----------
75740 75742
1 row selected.VARIABLE p_rid VARCHAR2(30)
EXEC SELECT ROWIDTOCHAR(rowid) INTO :p_rid FROM orders WHERE order_id = 1
SELECT order_id, status FROM orders WHERE rowid = :p_rid;
SELECT i.order_id, i.line_no, i.qty FROM order_items i JOIN orders o ON o.order_id = i.order_id WHERE o.rowid = :p_rid;PL/SQL procedure successfully completed.
ORDER_ID STATUS
---------- ------------------------------
1 NEW
1 row selected.
ORDER_ID LINE_NO QTY
---------- ---------- ----------
1 1 5
1 row selected.FAQ
What does ORA-01410 The ROWID is invalid mean?
The value compared with rowid is not a ROWID of the table being read: either it is not in ROWID format at all, or it belongs to another table.
Can I pass a ROWID from the application and use it later?
Yes, but only for the same table it was read from. In our test, a ROWID from orders worked on orders and failed with ORA-01410 on order_items.
How do I see which table a ROWID belongs to?
DBMS_ROWID.ROWID_OBJECT(rowid) returns the object number. Compare it with data_object_id in user_objects.
How we verify
Each scenario starts from fresh database users. A script runs the setup, confirms the exact error code, applies the fix and runs the statement again. The output shown is what the database printed, saved by the script.
lab_a and lab_b are ordinary users created for the test; system is the DBA account. Oracle AI Database 26ai Free Release 23.26.3.0.0 - Develop, Learn, and Run for Free 23.26.3.0.0