首页 > 应用开发 > IT综合 > The ROWID Pseudocolumn

The ROWID Pseudocolumn

原创 IT综合 作者:tsinglee 时间:2007-11-22 14:03:34 0 删除 编辑

Each table in an Oracle database internally has a pseudocolumn named ROWID. This pseudocolumn is not
evident when listing the structure of a table by executing a SELECT * FROM ... statement, or a
DESCRIBE ... statement using SQL*Plus, nor does the pseudocolumn take up space in the table.
However, each row's address can be retrieved with a SQL query using the reserved word ROWID as a
column name, for example:

SELECT ROWID, last_name FROM employees;

You cannot set the value of the pseudocolumn ROWID in INSERT or UPDATE statements, and you cannot
delete a ROWID value. Oracle uses the ROWID values in the pseudocolumn ROWID internally for the
construction of indexes.

You can reference rowids in the pseudocolumn ROWID like other table columns (used in SELECT lists
and WHERE clauses), but rowids are not stored in the database, nor are they database data. However,
you can create tables that contain columns having the ROWID datatype, although Oracle does not
guarantee that the values of such columns are valid rowids. The user must ensure that the data
stored in the ROWID column truly is a valid ROWID.


来自 “ ITPUB博客 ” ,链接:,如需转载,请注明出处,否则将追究法律责任。

下一篇: Physical Rowids
请登录后发表评论 登录
  • 博文量
  • 访问量