Oracle ROWID Usage Guide
In Oracle, ROWID is a special pseudo column that uniquely identifies a row of data in a database table. It can be used for quickly searching, updating, and deleting specific rows.
Here are several common methods for using ROWID in Oracle:
- Locate a row using ROWID:
SELECT * FROM table_name WHERE ROWID = ‘rowid_value’; - Update rows using ROWID:
Update the table set column1 equal to value where ROWID equals ‘rowid_value’. - Delete a row using its ROWID:
DELETE FROM table_name WHERE ROWID = ‘rowid_value’; - Inserting rows using the ROWID (inserting new rows at specific positions):
INSERT INTO table_name(column1, column2, …) VALUES (value1, value2, …);
It is important to note that ROWID is a unique identifier that is associated with the database instance. When reorganizing or reloading a data table, the value of ROWID may change. Therefore, before using ROWID for operations, it is necessary to ensure that it is currently valid.