Search code examples
oracle-databaseindexingrowid

oracle index on rowid column


Oracle documentation says Columns defined using the ROWID data type behave like other table columns: values can be updated, and so on.

Can I create a index on a column defined using ROWID data type containing rowids ?


Solution

  • Oracle must be right. Yes, you can.

    SQL> CREATE TABLE rowid_test (c_rowid ROWID);
    Table created
    SQL> CREATE INDEX rowid_test_idx ON rowid_test(c_rowid);
    Index created