ITPub博客

首页 > 应用开发 > 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.

[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10599713/viewspace-983292/,如需转载,请注明出处,否则将追究法律责任。

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